Sprig_Core::as_array PHP Method

as_array() public method

Get the model data as an associative array.
public as_array ( $verbose = FALSE ) : array
return array field => value
    public function as_array($verbose = FALSE)
    {
        $data = array_merge($this->_original, $this->_changed);
        if ($verbose) {
            foreach ($data as $field => $value) {
                // Convert each field to the verbose value
                $data[$field] = $this->_fields[$field]->verbose($value);
            }
        }
        return $data;
    }