PHP Class Jackalope\Query\QueryResult
The \Traversable interface enables the implementation to be addressed with
foreach. QueryResults have to implement einther \RecursiveIterator or
\Iterator.
The iterator is equivalent to
getRows() returning a list of the rows.
The iterator keys have no significant meaning.
Note: We use getRows and not getNodes as this is more generic. If you have a
single selector, you can either do foreach on getNodes or call getNode on the
rows.
Mostra file
Open project: jackalope/jackalope
Protected Properties
Public Methods
Method |
Description |
|
__construct ( Jackalope\FactoryInterface $factory, array $rawData, ObjectManager $objectManager ) |
Create a new query result from raw data from transport. |
|
getColumnNames ( ) |
{@inheritDoc} |
|
getIterator ( ) : Iterator |
Implement the IteratorAggregate interface and returns exactly the same
iterator as QueryResult::getRows() |
|
getNodes ( $prefetch = false ) |
{@inheritDoc} |
|
getRows ( ) |
{@inheritDoc} |
|
getSelectorNames ( ) |
{@inheritDoc} |
|
Method Details
__construct()
public method
Create a new query result from raw data from transport.
public __construct ( Jackalope\FactoryInterface $factory, array $rawData, ObjectManager $objectManager ) |
$factory |
Jackalope\FactoryInterface |
the object factory |
$rawData |
array |
the data as returned by the transport |
$objectManager |
Jackalope\ObjectManager |
|
getColumnNames()
public method
getIterator()
public method
Implement the IteratorAggregate interface and returns exactly the same
iterator as QueryResult::getRows()
public getIterator ( ) : Iterator |
return |
Iterator |
implementing SeekableIterator and Countable.
Keys are the row position in this result set, Values are the
RowInterface instances. |
getSelectorNames()
public method
Property Details
$factory protected_oe property
protected FactoryInterface,Jackalope $factory |
return |
Jackalope\FactoryInterface |
|
$objectmanager protected_oe property
protected ObjectManager,Jackalope $objectmanager |
return |
Jackalope\ObjectManager |
|
$rows protected_oe property
Storing the query result raw data
protected array $rows |
return |
array |
|