extends abstract class Phalcon\Mvc\Model\Resultset
implements JsonSerializable, Serializable, ArrayAccess, Countable, SeekableIterator, Traversable, Iterator, Phalcon\Mvc\Model\ResultsetInterface
Complex resultsets may include complete objects and scalar values. This class builds every complex row as it is required
Phalcon\Mvc\Model\Resultset\Complex constructor
Returns current row in the resultset
Returns a complete resultset as an array, if the resultset has a big number of rows it could consume more memory than currently it does.
Serializing a resultset will dump all related rows into a big array
Unserializing a resultset will allow to only works on the rows present in the saved state
Moves cursor to next row in the resultset
Check whether internal resource has rows to fetch
Gets pointer number of active row in the resultset
Rewinds resultset to its beginning
Changes internal pointer to a specific position in the resultset Set new position if required and set this->_row
Counts how many rows are in the resultset
Checks whether offset exists in the resultset
Gets row in a specific position of the resultset
Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface
Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface
Returns the internal type of data retrieval that the resultset is using
Get first row in the resultset
Get last row in the resultset
Set if the resultset is fresh or an old one cached
Tell if the resultset if fresh or an old one cached
Sets the hydration mode in the resultset
Returns the current hydration mode
Returns the associated cache for the resultset
Returns the error messages produced by a batch operation
Updates every record in the resultset
Deletes every record in the resultset
Filters a resultset returning only those the developer requires
$filtered = $robots->filter(function($robot){ if ($robot->id < 3) { return $robot; } });
Returns serialised model objects as array for json_encode. Calls jsonSerialize on each object if present
$robots = Robots::find(); echo json_encode($robots);
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_Model_Resultset_Complex.html