Sprig_Core::values PHP Method

values() public method

Load all of the values in an associative array. Ignores all fields are not in the model.
public values ( array $values )
$values array
    public function values(array $values)
    {
        // Remove all values which do not have a corresponding field
        $values = array_intersect_key($values, $this->_fields);
        foreach ($values as $field => $value) {
            $this->{$field} = $value;
        }
        return $this;
    }