class PDODataFetcher extends AbstractDataFetcher
Class PDODataFetcher
The PDO dataFetcher for PDOStatement.
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 |
array|null |
fetch($style = \PDO::FETCH_NUM)
Returns the data of the next row, based on this->next() && this->current(); |
|
void |
next()
Move forward to next element |
|
mixed |
current()
Return the current element |
|
mixed |
key()
Return the key of the current element |
|
boolean |
valid()
Checks if current position is valid |
|
void |
rewind()
Not supported in PDODataFetcher. |
|
close()
Frees the resultSet. |
||
int |
count()
Returns the count of items in the resultSet. |
|
string |
getIndexType()
Returns the TableMap::TYPE_* depends on your resultSet. |
|
bindColumn(mixed $column, mixed $param, int $type = null, int $maxlen = null, mixed $driverdata = null)
Bind a column to a PHP variable. |
Details
in AbstractDataFetcher at line 18
public
__construct(mixed $dataObject)
in AbstractDataFetcher at line 26
public
setDataObject(mixed $dataObject)
Sets the dataObject.
in AbstractDataFetcher at line 34
public mixed
getDataObject()
Returns the current data object that holds or references to actual data.
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();
at line 29
public array|null
fetch($style = \PDO::FETCH_NUM)
Returns the data of the next row, based on this->next() && this->current();
at line 37
public void
next()
Move forward to next element
at line 50
public mixed
current()
Return the current element
at line 58
public mixed
key()
Return the key of the current element
at line 66
public boolean
valid()
Checks if current position is valid
at line 76
public void
rewind()
Not supported in PDODataFetcher.
It actually fetches the first row, since a foreach in php triggers that
function as init.
at line 84
public
close()
Frees the resultSet.
at line 94
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().
at line 118
public
bindColumn(mixed $column, mixed $param, int $type = null, int $maxlen = null, mixed $driverdata = null)
Bind a column to a PHP variable.