PHP Класс Pheasant\Query\QueryIterator

Наследование: implements SeekableIterator, implements Countable
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( $query, $hydrator = null ) Constructor
before ( $callback ) Add a callback to be called with the query before it's executed
count ( ) Counts the number or results in the query
current ( ) : array Returns the row that matches the current position
key ( ) : integer Returns the current position
next ( ) Moves the internal pointer one step forward
rewind ( ) Rewinds the internal pointer
seek ( $position ) Seeks to a particular position in the result. Offset is from 0.
setHydrator ( $hydrator ) Sets a hydrator to be used
valid ( ) : boolean Returns true if the current position is valid, false otherwise.

Приватные методы

Метод Описание
_hydrate ( $row ) Hydrates a row into an object
_iterator ( ) Returns the delegate iterator from the resultset
_resultSet ( ) Returns the query result set iterator, executing the query if needed

Описание методов

__construct() публичный Метод

Constructor
public __construct ( $query, $hydrator = null )

before() публичный Метод

Add a callback to be called with the query before it's executed
public before ( $callback )

count() публичный Метод

Counts the number or results in the query
public count ( )

current() публичный Метод

Returns the row that matches the current position
public current ( ) : array
Результат array

key() публичный Метод

Returns the current position
public key ( ) : integer
Результат integer

next() публичный Метод

Moves the internal pointer one step forward
public next ( )

rewind() публичный Метод

Rewinds the internal pointer
public rewind ( )

seek() публичный Метод

Seeks to a particular position in the result. Offset is from 0.
public seek ( $position )

setHydrator() публичный Метод

Sets a hydrator to be used
public setHydrator ( $hydrator )

valid() публичный Метод

Returns true if the current position is valid, false otherwise.
public valid ( ) : boolean
Результат boolean