public function setValues(array $values)
    {
        foreach ($this->type->getAttributes()->getKeys() as $attribute_name) {
            if (array_key_exists($attribute_name, $values)) {
                $this->setValue($attribute_name, $values[$attribute_name]);
            }
        }

        return $this->isValid();
    }
public function setValues(array $values)
    {
        foreach ($this->type->getAttributes()->getKeys() as $attribute_name) {
            if (array_key_exists($attribute_name, $values)) {
                $this->setValue($attribute_name, $values[$attribute_name]);
            }
        }

        return $this->isValid();
    }
public function setValues ( array $ values ) { foreach ( $ this -> type -> getAttributes ( ) -> getKeys ( ) as $ attribute_name ) { if ( array_key_exists ( $ attribute_name , $ values ) ) { $ this -> setValue ( $ attribute_name , $ values [ $ attribute_name ] ) ; } } return $ this -> isValid ( ) ; }
Batch set a given list of attribute values.

@param array $values
Batch set a given list of attribute values .