lithium\data\model\Query::entity()
Set and get method for the query's entity instance.
Parameters
-
object
$entity
Reference to the query's current entity object.
Returns
\lithium\data\Query|\lithium\data\EntitySource
public function &entity(&$entity = null) {
if ($entity) {
$this->_entity = $entity;
return $this;
}
return $this->_entity;
}