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.
at line 22
public mixed
getDataObject()
Returns the current data object that holds or references to actual data.
at line 30
public mixed
current()
Return the current element
at line 38
public void
next()
Move forward to next element
at line 46
public mixed
key()
Return the key of the current element
at line 55
public boolean
valid()
Checks if current position is valid
at line 63
public void
rewind()
Rewind the Iterator to the first element
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();
at line 81
public array|null
fetch()
Returns the data of the next row, based on this->next() && this->current();
at line 86
public
close()
Frees the resultSet.
at line 93
public int
count()
Returns the count of items in the resultSet.
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().