Propel 2 API
Class

Propel\Runtime\DataFetcher\ArrayDataFetcher

class ArrayDataFetcher extends AbstractDataFetcher

Class ArrayDataFetcher

Methods

__construct(mixed $dataObject)

from AbstractDataFetcher
setDataObject(mixed $dataObject)

Sets the dataObject.

from AbstractDataFetcher
mixed getDataObject()

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

from AbstractDataFetcher
mixed|null fetchColumn(int $index = null)

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

from AbstractDataFetcher
void next()

Move forward to next element

mixed current()

Return the current element

array|null fetch()

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

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

string getIndexType()

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

int count()

Returns the count of items in the resultSet.

setIndexType(string $indexType)

Sets the current index type.

close()

Frees the resultSet.

Details

in AbstractDataFetcher at line 18
public __construct(mixed $dataObject)

Parameters

mixed $dataObject

in AbstractDataFetcher at line 26
public setDataObject(mixed $dataObject)

Sets the dataObject.

Parameters

mixed $dataObject

in AbstractDataFetcher at line 34
public mixed getDataObject()

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

Return Value

mixed

in AbstractDataFetcher at line 42
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 22
public void next()

Move forward to next element

Return Value

void Any returned value is ignored.

at line 32
public mixed current()

Return the current element

Return Value

mixed Can return any type.

at line 40
public array|null fetch()

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

Return Value

array|null

at line 51
public mixed key()

Return the key of the current element

Return Value

mixed scalar on success, or null on failure.

at line 59
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 67
public void rewind()

Rewind the Iterator to the first element

Return Value

void Any returned value is ignored.

at line 75
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_*

at line 83
public int count()

Returns the count of items in the resultSet.

Return Value

int

at line 93
public setIndexType(string $indexType)

Sets the current index type.

Parameters

string $indexType one of TableMap::TYPE_*

at line 101
public close()

Frees the resultSet.