Table Of Contents

Previous topic

Class Phalcon\Mvc\Model\Resultset

Next topic

Class Phalcon\Mvc\Model\Resultset\Simple

This Page

Class Phalcon\Mvc\Model\Resultset\Complex

extends Phalcon\Mvc\Model\Resultset

implements 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 the’re required

Methods

public __construct (array $columnsTypes, Phalcon\Db\ResultInterface $result, Phalcon\Cache\BackendInterface $cache)

Phalcon\Mvc\Model\Resultset\Complex constructor

public boolean valid ()

Check whether internal resource has rows to fetch

public string serialize ()

Serializing a resultset will dump all related rows into a big array

public unserialize (string $data)

Unserializing a resultset will allow to only works on the rows present in the saved state

public next () inherited from Phalcon\Mvc\Model\Resultset

Moves cursor to next row in the resultset

public int key () inherited from Phalcon\Mvc\Model\Resultset

Gets pointer number of active row in the resultset

public rewind () inherited from Phalcon\Mvc\Model\Resultset

Rewinds resultset to its beginning

public seek (int $position) inherited from Phalcon\Mvc\Model\Resultset

Changes internal pointer to a specific position in the resultset

public int count () inherited from Phalcon\Mvc\Model\Resultset

Counts how many rows are in the resultset

public boolean offsetExists (int $index) inherited from Phalcon\Mvc\Model\Resultset

Checks whether offset exists in the resultset

public Phalcon\Mvc\Model offsetGet (int $index) inherited from Phalcon\Mvc\Model\Resultset

Gets row in a specific position of the resultset

public offsetSet (int $index, Phalcon\Mvc\Model $value) inherited from Phalcon\Mvc\Model\Resultset

Resulsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface

public offsetUnset (int $offset) inherited from Phalcon\Mvc\Model\Resultset

Resulsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface

public Phalcon\Mvc\Model getFirst () inherited from Phalcon\Mvc\Model\Resultset

Get first row in the resultset

public Phalcon\Mvc\Model getLast () inherited from Phalcon\Mvc\Model\Resultset

Get last row in the resultset

public setIsFresh (boolean $isFresh) inherited from Phalcon\Mvc\Model\Resultset

Set if the resultset is fresh or an old one cached

public boolean isFresh () inherited from Phalcon\Mvc\Model\Resultset

Tell if the resultset if fresh or an old one cached

public Phalcon\Cache\Backend getCache () inherited from Phalcon\Mvc\Model\Resultset

Returns the associated cache for the resultset

public object current () inherited from Phalcon\Mvc\Model\Resultset

Returns current row in the resultset