DefaultList
in package
implements
ArrayAccess, Iterator, Countable, RampageList
Iterator for collections of Rdo objects.
Tags
Interfaces, Classes, Traits and Enums
- ArrayAccess
- Iterator
- Countable
- RampageList
Table of Contents
- $_bindParams : array<string|int, mixed>
- Bind parameters
- $_count : int
- The number of objects in the list.
- $_current : Base
- Current object
- $_eof : bool
- Are we at the end of the list?
- $_index : int
- Current list offset.
- $_mapper : 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() : 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 List objects
- offsetGet() : Base
- Implementation of the offsetGet() method for ArrayAccess This method is executed when using isset() or empty() on List objects
- offsetSet() : Base
- Not implemented.
- offsetUnset() : 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
$_current
Current object
protected
Base
$_current
$_eof
Are we at the end of the list?
protected
bool
$_eof
$_index
Current list offset.
protected
int
$_index
$_mapper
Rdo Mapper
protected
Mapper
$_mapper
$_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[, Mapper $mapper = null ]) : mixed
Parameters
- $query : mixed
-
The query to run when results are requested. Can be a Query object, a literal SQL query, or a tuple containing an SQL string and an array of bind parameters to use.
- $mapper : 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() : Base|null
Return values
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 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 List objects
public
offsetGet(int $offset) : Base
Parameters
- $offset : int
-
The offset to retrieve.
Return values
Base —An entity object at the offset position or null
offsetSet()
Not implemented.
public
offsetSet(Base $offset, Base $item) : Base
Stub of the offsetSet() method for ArrayAccess This method is executed when adding an item to the List
Parameters
Return values
Base —An entity object at the offset position or null
offsetUnset()
Not implemented.
public
offsetUnset(int $offset) : Base
Stub of the offsetUnset() method for ArrayAccess This method is executed when calling unset on a List index
Parameters
- $offset : int
-
The offset to unset.
Return values
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