Public Member Functions | |
OArray ($array=array()) | |
__construct ($array=array()) | |
getNewIterator () | |
size () | |
isEmpty () | |
& | get ($i) |
indexOf ($element) | |
& | set ($i, $item) |
& | setRef ($i, &$item) |
contains ($o) | |
add ($o) | |
remove ($o) | |
removeIndex ($i) | |
clear () | |
push ($o) | |
pushRef (&$o) | |
& | values () |
& | pop () |
& | shift () |
& | toArray () |
toString () | |
Public Attributes | |
$_array | |
$_size = 0 |
This class implements a simple interface quite like java to handle array in a good old oo way.
Definition at line 36 of file OArray.php.
|
OArray constructor.
Definition at line 47 of file OArray.php. References __construct(). |
|
OArray php4.4 compliant constructor.
Definition at line 58 of file OArray.php. References $i, __construct(), and pushRef(). Referenced by __construct(), and OArray(). |
|
Add an element to the vector.
Definition at line 170 of file OArray.php. Referenced by add(). |
|
Clear vector. Definition at line 212 of file OArray.php. |
|
Test if the vector contains the specified element.
Definition at line 157 of file OArray.php. References $i, contains(), and size(). Referenced by contains(). |
|
Retrieve element at specified index.
Definition at line 98 of file OArray.php. References $i, get(), and size(). Referenced by get(). |
|
Retrieve an iterator ready to used.
Reimplemented from Iterable. Definition at line 70 of file OArray.php. |
|
Retrieve index of specified element.
Definition at line 113 of file OArray.php. Referenced by indexOf(). |
|
Returns true if this vector is empty, false otherwise.
Definition at line 88 of file OArray.php. References size(). |
|
Remove the last element of the vector and returns it.
Definition at line 258 of file OArray.php. |
|
Add an element at the end of the vector (same as add()).
Definition at line 222 of file OArray.php. References push(). |
|
Add an element at the end of the vector (same as add()).
Definition at line 232 of file OArray.php. References pushRef(). Referenced by __construct(), and pushRef(). |
|
Remove object from this vector.
Definition at line 181 of file OArray.php. References $i, remove(), and removeIndex(). Referenced by remove(). |
|
Remove specified index from vector.
Definition at line 197 of file OArray.php. References $i, removeIndex(), and size(). Referenced by remove(), and removeIndex(). |
|
Set the item at specified index.
Definition at line 129 of file OArray.php. References set(), and setRef(). Referenced by set(). |
|
Set the item at specified index (by reference).
Definition at line 140 of file OArray.php. |
|
Extract and return first element of OArray.
Definition at line 268 of file OArray.php. |
|
Returns the vector number of elements.
Reimplemented from Iterable. Definition at line 79 of file OArray.php. Referenced by contains(), get(), isEmpty(), removeIndex(), setRef(), and values(). |
|
Retrieve a php array for this vector.
Definition at line 279 of file OArray.php. References values(). |
|
Retrieve a string representation of the array. Definition at line 287 of file OArray.php. |
|
Retrieve vector values. The returned array contains references to internal data.
Definition at line 244 of file OArray.php. Referenced by toArray(). |
|
Definition at line 38 of file OArray.php. |
|
Definition at line 39 of file OArray.php. |