\Horde_Rdo_List

Iterator for collections of Rdo objects.

Summary

Methods
Properties
Constants
__construct()
__destruct()
rewind()
current()
key()
next()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
valid()
count()
No public properties found
No constants found
No protected methods found
$_query
$_mapper
$_sql
$_bindParams
$_result
$_current
$_index
$_eof
$_count
N/A
No private methods found
No private properties found
N/A

Properties

$_query

$_query : mixed

Rdo Query

Type

mixed

$_sql

$_sql : string

SQL query to run

Type

string

$_bindParams

$_bindParams : array

Bind parameters

Type

array

$_result

$_result : \Iterator

Result resource

Type

\Iterator

$_current

$_current : \Horde_Rdo_Base

Current object

Type

\Horde_Rdo_Base

$_index

$_index : integer

Current list offset.

Type

integer

$_eof

$_eof : boolean

Are we at the end of the list?

Type

boolean

$_count

$_count : integer

The number of objects in the list.

Type

integer

Methods

__construct()

__construct(mixed  $query, \Horde_Rdo_Mapper  $mapper = null) 

Constructor.

Parameters

mixed $query

The query to run when results are requested. Can be a Horde_Rdo_Query object, a literal SQL query, or a tuple containing an SQL string and an array of bind parameters to use.

\Horde_Rdo_Mapper $mapper

Mapper to create objects for this list from.

__destruct()

__destruct() 

Destructor - release any resources.

rewind()

rewind() 

Implementation of the rewind() method for iterator.

current()

current() : mixed

Implementation of the current() method for iterator.

Returns

mixed —

The current row, or null if no rows.

key()

key() : mixed

Implementation of the key() method for iterator.

Returns

mixed —

The current row number (starts at 0), or NULL if no rows

next()

next() : \Horde_Rdo_Base|null

Implementation of the next() method.

Returns

\Horde_Rdo_Base|null —

The next Rdo object in the set or null if no more results.

offsetExists()

offsetExists(integer  $offset) : boolean

Implementation of the offsetExists() method for ArrayAccess This method is executed when using isset() or empty() on Horde_Rdo_List objects

Parameters

integer $offset

The offset to check.

Returns

boolean —

Whether or not an offset exists.

offsetGet()

offsetGet(integer  $offset) : \Horde_Rdo_Base

Implementation of the offsetGet() method for ArrayAccess This method is executed when using isset() or empty() on Horde_Rdo_List objects

Parameters

integer $offset

The offset to retrieve.

Returns

\Horde_Rdo_Base

An entity object at the offset position or null

offsetSet()

offsetSet(\Horde_Rdo_Base  $offset, \Horde_Rdo_Base  $item) : \Horde_Rdo_Base

Not implemented.

Stub of the offsetSet() method for ArrayAccess This method is executed when adding an item to the Horde_Rdo_List

Parameters

\Horde_Rdo_Base $offset

The item to add to the list.

\Horde_Rdo_Base $item

The item to add to the list.

Returns

\Horde_Rdo_Base

An entity object at the offset position or null

offsetUnset()

offsetUnset(integer  $offset) : \Horde_Rdo_Base

Not implemented.

Stub of the offsetUnset() method for ArrayAccess This method is executed when calling unset on a Horde_Rdo_List index

Parameters

integer $offset

The offset to unset.

Returns

\Horde_Rdo_Base

An entity object at the offset position or null

valid()

valid() : boolean

Implementation of the valid() method for iterator

Returns

boolean —

Whether the iteration is valid

count()

count() : integer

Implementation of count() for Countable

Returns

integer —

Number of elements in the list