Public Member Functions | |
__construct (array $rawData) | |
__get (string $name) | |
next () | |
prev () | |
row (int $row) | |
rowCount () | |
getResults () | |
get () | |
Protected Attributes | |
$_rawData = [] | |
$_rows = 0 | |
$_currRow = -1 | |
SlaxWeb\DatabasePDO\Result::__construct | ( | array | $rawData | ) |
Class constructor
Save the raw result data into the protected property '$_rawData'.
array | $rawData | Raw data array |
SlaxWeb\DatabasePDO\Result::__get | ( | string | $name | ) |
Magic Get Method
Retrieves the result row column value and returns it to the caller. If the internal index is not pointing to a valid row, or the requested column is not part of the result set, an exception is thrown.
string | $name | Name of the column |
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::get | ( | ) |
Get Row
Returns the row object to the caller. If the row does not exists, an exception is thrown.
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::getResults | ( | ) |
Get result set
Returns the raw result set array to the caller.
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::next | ( | ) |
Next row
Move the internal pointer to the next row of the result array. If there is no row found under the next index, bool(false) is returned, otherwise bool(true) is returned.
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::prev | ( | ) |
Previous row
Move the internal pointer to the previous row of the result array. If there is no row found under the previous index, bool(false) is returned, otherwise bool(true) is returned.
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::row | ( | int | $row | ) |
Jump to row
Move the internal pointer to the passed in row of the result array. If there is no row found under the passed in row, bool(false) is returned, otherwise bool(true) is returned.
int | $row | Row number |
Implements SlaxWeb\Database\Interfaces\Result.
SlaxWeb\DatabasePDO\Result::rowCount | ( | ) |
Get row count
Get the row count of the result set.
Implements SlaxWeb\Database\Interfaces\Result.