DataResult

abstract class representing the result object returned from the DataAccess object

Summary
abstract class representing the result object returned from the DataAccess object
DataResult
ArrayObject holding the current row data
current row number
indicates if there are any more rows in result set
returns an ArrayObject containing row data or false if no (more) rows
resets data pointer to first row of data set (0 indexed)
returns number of rows in result set
returns value of valid (overrides Iterator::valid())
returns current row from dataset (overrides Iterator:: current())
returns current row number (overrides Iterator::key())
repositions cursor to beginning of dataset and resets row number (overrides Iterator::rewind())
retrieves next row from dataset, places it into currentRow and increments row number (overrides Iterator:: next())

Variables

result

protected $result

DataResult

currentRow

protected $currentRow

ArrayObject holding the current row data

rowNum

protected $rowNum

current row number

valid

protected $valid

indicates if there are any more rows in result set

Functions

getRow

abstract protected function getRow()

returns an ArrayObject containing row data or false if no (more) rows

getRow

resets data pointer to first row of data set (0 indexed)

parameters

rown_numrow number to seek to (default 0)

getNumRows

abstract public function getNumRows()

returns number of rows in result set

getNumFields

abstract public function getNumFields()

valid

public function valid()

returns value of valid (overrides Iterator::valid())

returns

boolean

current

public function current()

returns current row from dataset (overrides Iterator:: current())

returns

ArrayObject

key

public function key()

returns current row number (overrides Iterator::key())

returns

integer

rewind

public function rewind()

repositions cursor to beginning of dataset and resets row number (overrides Iterator::rewind())

returns

boolean

next

public function next()

retrieves next row from dataset, places it into currentRow and increments row number (overrides Iterator:: next())

returns

boolean

protected $result
DataResult
protected $currentRow
ArrayObject holding the current row data
protected $rowNum
current row number
protected $valid
indicates if there are any more rows in result set
abstract protected function getRow()
returns an ArrayObject containing row data or false if no (more) rows
abstract public function getNumRows()
returns number of rows in result set
abstract public function getNumFields()
public function current()
returns current row from dataset (overrides Iterator:: current())
public function key()
returns current row number (overrides Iterator::key())
public function rewind()
repositions cursor to beginning of dataset and resets row number (overrides Iterator::rewind())
public function next()
retrieves next row from dataset, places it into currentRow and increments row number (overrides Iterator:: next())