public function setAttributes($values)
    {
        if (!is_array($values)) {
            return;
        }
        foreach ($values as $name => $value) {
            $this->$name = $value;
        }
    }
public function setAttributes($values)
    {
        if (!is_array($values)) {
            return;
        }
        foreach ($values as $name => $value) {
            $this->$name = $value;
        }
    }
public function setAttributes ( $ values ) { if ( ! is_array ( $ values ) ) { return ; } foreach ( $ values as $ name => $ value ) { $ this -> $ name = $ value ; } }
Sets the properties values in a massive way.
@param array $values properties values (name=>value) to be set.
Sets the properties values in a massive way .