Zend\Db\ResultSet\ResultSet
Synopsis
class ResultSet
extends AbstractResultSet
{
- // constants
- const TYPE_ARRAYOBJECT = 'arrayobject';
- const TYPE_ARRAY = 'array';
- // members
- protected array $allowedReturnTypes;
- protected ArrayObject $arrayObjectPrototype;
- protected ResultSet::TYPE_ARRAYOBJECT|ResultSet::TYPE_ARRAY $returnType;
- // Inherited members from AbstractResultSet
- protected mixed $buffer;
- protected null|int $count;
- protected Iterator|IteratorAggregate|ResultInterface $dataSource;
- protected int $fieldCount;
- protected integer $position;
- // methods
- public void __construct()
- public ResultSet setArrayObjectPrototype()
- public ArrayObject getArrayObjectPrototype()
- public string getReturnType()
- public ArrayObject|null current()
- // Inherited methods from AbstractResultSet
- public ResultSet initialize()
- public void buffer()
- public void isBuffered()
- public null|Iterator getDataSource()
- public int getFieldCount()
- public void next()
- public mixed key()
- public array current()
- public bool valid()
- public void rewind()
- public int count()
- public array toArray()
Hierarchy
Constants
Name | Value |
---|---|
TYPE_ARRAYOBJECT | 'arrayobject' |
TYPE_ARRAY | 'array' |
Members
protected
- $allowedReturnTypes
—
array
Allowed return types - $arrayObjectPrototype — ArrayObject
- $buffer
—
mixed
if -1, datasource is already buffered if -2, implicitly disabling buffering in ResultSet if false, explicitly disabled if null, default state - nothing, but can buffer until iteration started if array, already buffering - $count — Zend\Db\ResultSet\null|int
- $dataSource — Zend\Db\ResultSet\Iterator|IteratorAggregate|ResultInterface
- $fieldCount — int
- $position — int
- $returnType
—
Zend\Db\ResultSet\ResultSet::TYPE_ARRAYOBJECT|ResultSet::TYPE_ARRAY
Return type to use when returning an object from the set
Methods
public
- __construct() — Constructor
- current()
- getArrayObjectPrototype() — Get the row object prototype
- getReturnType() — Get the return type to use when returning objects from the set
- setArrayObjectPrototype() — Set the row object prototype
Inherited from Zend\Db\ResultSet\AbstractResultSet
public
- buffer()
- count() — Countable: return count of rows
- current() — Iterator: get current item
- getDataSource() — Get the data source used to create the result set
- getFieldCount() — Retrieve count of fields in individual rows of the result set
- initialize() — Set the data source for the result set
- isBuffered()
- key() — Iterator: retrieve current key
- next() — Iterator: move pointer to next item
- rewind() — Iterator: rewind
- toArray() — Cast result set to array of arrays
- valid() — Iterator: is pointer valid?