protected function assignPropertyValues(array $values)
    {
        foreach ($values as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
    }
protected function assignPropertyValues(array $values)
    {
        foreach ($values as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
    }
protected function assignPropertyValues ( array $ values ) { foreach ( $ values as $ property => $ value ) { if ( property_exists ( $ this , $ property ) ) { $ this -> { $ property } = $ value ; } } }
Assign values to properties

@param array $values
Assign values to properties