lithium\data\model\Query::data()
Set and get method for the query's record's data.
Parameters
-
array
$data
if set, will set given array.
Returns
arrayEmpty array if no data, array of data if the record has it.
Source
public function data($data = []) {
$bind =& $this->_entity;
if ($data) {
$bind ? $bind->set($data) : $this->_data = array_merge($this->_data, $data);
return $this;
}
$data = $bind ? $bind->data() : $this->_data;
return ($list = $this->_config['whitelist']) ? array_intersect_key($data, $list) : $data;
}