Propel 2 API
Interface

Propel\Runtime\DataFetcher\DataFetcherInterface

interface DataFetcherInterface implements Iterator, Countable

Interface class for DataFetcher.

Methods

setDataObject(mixed $dataObject)

Sets the dataObject.

mixed getDataObject()

Returns the current data object that holds or references to actual data.

mixed current()

Return the current element

void next()

Move forward to next element

mixed key()

Return the key of the current element

boolean valid()

Checks if current position is valid

void rewind()

Rewind the Iterator to the first element

mixed|null fetchColumn(int $index = null)

Returns the data of the first column of the next row, based on this->fetch();

array|null fetch()

Returns the data of the next row, based on this->next() && this->current();

close()

Frees the resultSet.

int count()

Returns the count of items in the resultSet.

string getIndexType()

Returns the TableMap::TYPE_* depends on your resultSet.

Details

at line 15
public setDataObject(mixed $dataObject)

Sets the dataObject.

Parameters

mixed $dataObject

at line 22
public mixed getDataObject()

Returns the current data object that holds or references to actual data.

Return Value

mixed

at line 30
public mixed current()

Return the current element

Return Value

mixed Can return any type.

at line 38
public void next()

Move forward to next element

Return Value

void Any returned value is ignored.

at line 46
public mixed key()

Return the key of the current element

Return Value

mixed scalar on success, or null on failure.

at line 55
public boolean valid()

Checks if current position is valid

Return Value

boolean The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

at line 63
public void rewind()

Rewind the Iterator to the first element

Return Value

void Any returned value is ignored.

at line 73
public mixed|null fetchColumn(int $index = null)

Returns the data of the first column of the next row, based on this->fetch();

Parameters

int $index

Return Value

mixed|null

at line 81
public array|null fetch()

Returns the data of the next row, based on this->next() && this->current();

Return Value

array|null

at line 86
public close()

Frees the resultSet.

at line 93
public int count()

Returns the count of items in the resultSet.

Return Value

int

at line 102
public string getIndexType()

Returns the TableMap::TYPE_* depends on your resultSet.

We need this information
to be able to populate objects based on your array of fetch().

Return Value

string one of TableMap::TYPE_*