Documentation

Horde_Rdo_List
in package
implements ArrayAccess, Iterator, Countable

Iterator for collections of Rdo objects.

Tags
TODO

implement ArrayAccess as well?

category

Horde

Interfaces, Classes, Traits and Enums

ArrayAccess
Iterator
Countable

Table of Contents

$_bindParams  : array<string|int, mixed>
Bind parameters
$_count  : int
The number of objects in the list.
$_current  : Horde_Rdo_Base
Current object
$_eof  : bool
Are we at the end of the list?
$_index  : int
Current list offset.
$_mapper  : Horde_Rdo_Mapper
Rdo Mapper
$_query  : mixed
Rdo Query
$_result  : Iterator
Result resource
$_sql  : string
SQL query to run
__construct()  : mixed
Constructor.
__destruct()  : mixed
Destructor - release any resources.
count()  : int
Implementation of count() for Countable
current()  : mixed
Implementation of the current() method for iterator.
key()  : mixed
Implementation of the key() method for iterator.
next()  : Horde_Rdo_Base|null
Implementation of the next() method.
offsetExists()  : bool
Implementation of the offsetExists() method for ArrayAccess This method is executed when using isset() or empty() on Horde_Rdo_List objects
offsetGet()  : Horde_Rdo_Base
Implementation of the offsetGet() method for ArrayAccess This method is executed when using isset() or empty() on Horde_Rdo_List objects
offsetSet()  : Horde_Rdo_Base
Not implemented.
offsetUnset()  : Horde_Rdo_Base
Not implemented.
rewind()  : mixed
Implementation of the rewind() method for iterator.
valid()  : bool
Implementation of the valid() method for iterator

Properties

$_bindParams

Bind parameters

protected array<string|int, mixed> $_bindParams = array()

$_count

The number of objects in the list.

protected int $_count

$_eof

Are we at the end of the list?

protected bool $_eof

$_index

Current list offset.

protected int $_index

$_query

Rdo Query

protected mixed $_query

$_result

Result resource

protected Iterator $_result

$_sql

SQL query to run

protected string $_sql

Methods

__construct()

Constructor.

public __construct(mixed $query[, Horde_Rdo_Mapper $mapper = null ]) : mixed
Parameters
$query : mixed

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.

$mapper : Horde_Rdo_Mapper = null

Mapper to create objects for this list from.

Return values
mixed

__destruct()

Destructor - release any resources.

public __destruct() : mixed
Return values
mixed

count()

Implementation of count() for Countable

public count() : int
Return values
int

Number of elements in the list

current()

Implementation of the current() method for iterator.

public current() : mixed
Return values
mixed

The current row, or null if no rows.

key()

Implementation of the key() method for iterator.

public key() : mixed
Return values
mixed

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

next()

Implementation of the next() method.

public next() : Horde_Rdo_Base|null
Return values
Horde_Rdo_Base|null

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

offsetExists()

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

public offsetExists(int $offset) : bool
Parameters
$offset : int

The offset to check.

Return values
bool

Whether or not an offset exists.

offsetGet()

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

public offsetGet(int $offset) : Horde_Rdo_Base
Parameters
$offset : int

The offset to retrieve.

Return values
Horde_Rdo_Base

An entity object at the offset position or null

offsetUnset()

Not implemented.

public offsetUnset(int $offset) : Horde_Rdo_Base

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

Parameters
$offset : int

The offset to unset.

Return values
Horde_Rdo_Base

An entity object at the offset position or null

rewind()

Implementation of the rewind() method for iterator.

public rewind() : mixed
Return values
mixed

valid()

Implementation of the valid() method for iterator

public valid() : bool
Return values
bool

Whether the iteration is valid

Search results