PHP 클래스 Pheasant\Query\QueryIterator

상속: implements SeekableIterator, implements Countable
파일 보기 프로젝트 열기: lox/pheasant

공개 메소드들

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