PHP Class Horde_Db_Adapter_Base_Result, horde

Author: Jan Schneider ([email protected])
Inheritance: implements Iterator
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_adapter Horde_Db_Adapter
$_arg1 mixed
$_arg2 string
$_current array Current row.
$_eof boolean Are we at the end of the result?
$_fetchMode Which kind of keys to use for results.
$_index integer Current offset.
$_result resource Result resource.
$_sql string

Public Methods

Method Description
__construct ( Horde_Db_Adapter $adapter, string $sql, mixed $arg1 = null, string $arg2 = null ) Constructor.
__destruct ( ) Destructor.
columnCount ( ) : integer Returns the number of columns in the result set.
current ( ) : array Implementation of the current() method for Iterator.
fetch ( integer $fetchmode = Horde_Db::FETCH_ASSOC ) Returns the current row and advances the recordset one row.
key ( ) : mixed Implementation of the key() method for Iterator.
next ( ) : array | null Implementation of the next() method for Iterator.
rewind ( ) Implementation of the rewind() method for iterator.
setFetchMode ( integer $fetchmode ) Sets the default fetch mode for this result.
valid ( ) : boolean Implementation of the valid() method for Iterator.

Protected Methods

Method Description
_columnCount ( ) : integer Returns the number of columns in the result set.
_fetchArray ( ) : array | boolean Returns a row from a resultset.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Db_Adapter $adapter, string $sql, mixed $arg1 = null, string $arg2 = null )
$adapter Horde_Db_Adapter A driver instance.
$sql string A SQL query.
$arg1 mixed Either an array of bound parameters or a query name.
$arg2 string If $arg1 contains bound parameters, the query name.

__destruct() public method

Destructor.
public __destruct ( )

_columnCount() abstract protected method

Returns the number of columns in the result set.
abstract protected _columnCount ( ) : integer
return integer Number of columns.

_fetchArray() abstract protected method

Returns a row from a resultset.
abstract protected _fetchArray ( ) : array | boolean
return array | boolean The next row in the resultset or false if there are no more results.

columnCount() public method

Returns the number of columns in the result set.
public columnCount ( ) : integer
return integer Number of columns.

current() public method

Implementation of the current() method for Iterator.
public current ( ) : array
return array The current row, or null if no rows.

fetch() public method

Returns the current row and advances the recordset one row.
public fetch ( integer $fetchmode = Horde_Db::FETCH_ASSOC )
$fetchmode integer The default fetch mode for this result. One of the Horde_Db::FETCH_* constants.

key() public method

Implementation of the key() method for Iterator.
public key ( ) : mixed
return mixed The current row number (starts at 0), or null if no rows.

next() public method

Implementation of the next() method for Iterator.
public next ( ) : array | null
return array | null The next row in the resultset or null if there are no more results.

rewind() public method

Implementation of the rewind() method for iterator.
public rewind ( )

setFetchMode() public method

Sets the default fetch mode for this result.
public setFetchMode ( integer $fetchmode )
$fetchmode integer One of the Horde_Db::FETCH_* constants.

valid() public method

Implementation of the valid() method for Iterator.
public valid ( ) : boolean
return boolean Whether the iteration is valid.

Property Details

$_adapter protected_oe property

protected Horde_Db_Adapter $_adapter
return Horde_Db_Adapter

$_arg1 protected_oe property

protected mixed $_arg1
return mixed

$_arg2 protected_oe property

protected string $_arg2
return string

$_current protected_oe property

Current row.
protected array $_current
return array

$_eof protected_oe property

Are we at the end of the result?
protected bool $_eof
return boolean

$_fetchMode protected_oe property

Which kind of keys to use for results.
protected $_fetchMode

$_index protected_oe property

Current offset.
protected int $_index
return integer

$_result protected_oe property

Result resource.
protected resource $_result
return resource

$_sql protected_oe property

protected string $_sql
return string