value. Unknown names are ignored. */ public function __construct( array $values = array() ) { foreach ( array( 'title_min', 'title_max', 'description_min', 'description_max', 'photos_default', 'batch_max' ) as $name ) { if ( isset( $values[ $name ] ) ) { $this->$name = max( 1, (int) $values[ $name ] ); } } if ( isset( $values['forbids_contacts'] ) ) { $this->forbids_contacts = (bool) $values['forbids_contacts']; } } }