PHP 클래스 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.
상속: implements IteratorAggregate, implements PHPCR\Query\QueryResultInterface
파일 보기 프로젝트 열기: jackalope/jackalope

보호된 프로퍼티들

프로퍼티 타입 설명
$factory Jackalope\FactoryInterface
$objectmanager Jackalope\ObjectManager
$rows array Storing the query result raw data

공개 메소드들

메소드 설명
__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}

메소드 상세

__construct() 공개 메소드

Create a new query result from raw data from transport.
또한 보기: QueryInterface::query() The raw data format
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() 공개 메소드

{@inheritDoc}
public getColumnNames ( )

getIterator() 공개 메소드

Implement the IteratorAggregate interface and returns exactly the same iterator as QueryResult::getRows()
public getIterator ( ) : Iterator
리턴 Iterator implementing SeekableIterator and Countable. Keys are the row position in this result set, Values are the RowInterface instances.

getNodes() 공개 메소드

{@inheritDoc}
public getNodes ( $prefetch = false )

getRows() 공개 메소드

{@inheritDoc}
public getRows ( )

getSelectorNames() 공개 메소드

{@inheritDoc}
public getSelectorNames ( )

프로퍼티 상세

$factory 보호되어 있는 프로퍼티

protected FactoryInterface,Jackalope $factory
리턴 Jackalope\FactoryInterface

$objectmanager 보호되어 있는 프로퍼티

protected ObjectManager,Jackalope $objectmanager
리턴 Jackalope\ObjectManager

$rows 보호되어 있는 프로퍼티

Storing the query result raw data
또한 보기: QueryInterface::query()
protected array $rows
리턴 array