Propel API
Class

PropelOnDemandIterator

class PropelOnDemandIterator implements Iterator

Class for iterating over a statement and returning one Propel object at a time

Methods

__construct(PropelFormatter $formatter, PDOStatement $stmt)

closeCursor()

integer count()

Returns the number of rows in the resultset Warning: this number is inaccurate for most databases.

BaseObject current()

Gets the current Model object in the collection This is where the hydration takes place.

string key()

Gets the current key in the iterator

next()

Advances the curesor in the statement Closes the cursor if the end of the statement is reached

rewind()

Initializes the iterator by advancing to the first position This method can only be called once (this is a NoRewindIterator)

boolean valid()

Details

at line 39
public __construct(PropelFormatter $formatter, PDOStatement $stmt)

Parameters

PropelFormatter $formatter
PDOStatement $stmt

at line 46
public closeCursor()

at line 57
public integer count()

Returns the number of rows in the resultset Warning: this number is inaccurate for most databases.

Do not rely on it for a portable application.

Return Value

integer Number of results

at line 72
public BaseObject current()

Gets the current Model object in the collection This is where the hydration takes place.

Return Value

BaseObject

See also

PropelObjectFormatter::getAllObjectsFromRow()

at line 82
public string key()

Gets the current key in the iterator

Return Value

string

at line 91
public next()

Advances the curesor in the statement Closes the cursor if the end of the statement is reached

at line 108
public rewind()

Initializes the iterator by advancing to the first position This method can only be called once (this is a NoRewindIterator)

at line 128
public boolean valid()

Return Value

boolean