|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| attach ($obj, $inf=NULL) | |
| contains ($obj) | |
| count () | |
| current () | |
| detach ($obj) | |
| getInfo () | |
| key () | |
| next () | |
| offsetEsists ($obj) | |
| offsetExists ($offset) | |
| offsetGet ($obj) | |
| offsetSet ($obj, $inf) | |
| offsetUnset ($obj) | |
| rewind () | |
| setInfo ($inf=NULL) | |
| valid () | |
Private Attributes | |
| $index = 0 | |
| $storage = array() | |
Object storage.
This container allows to store objects uniquly without the need to compare them one by one. This is only possible internally. The code representation here therefore has a complexity of O(n) while the actual implementation has complexity O(1).
Definition at line 23 of file splobjectstorage.inc.
| SplObjectStorage::attach | ( | $obj, | |
$inf = NULL |
|||
| ) |
| $obj | new object to attach to storage or object whose associative information is to be replaced |
| $inf | associative information stored along the object |
Definition at line 113 of file splobjectstorage.inc.
References contains().
Referenced by offsetSet().

| SplObjectStorage::contains | ( | $obj | ) |
| $obj | object to look for |
Definition at line 94 of file splobjectstorage.inc.
Referenced by attach(), and offsetEsists().
| SplObjectStorage::count | ( | ) |
Implements Countable.
Definition at line 86 of file splobjectstorage.inc.
| SplObjectStorage::current | ( | ) |
Implements Iterator.
Definition at line 51 of file splobjectstorage.inc.
Referenced by getInfo().
| SplObjectStorage::detach | ( | $obj | ) |
| $obj | object to remove from storage |
Definition at line 123 of file splobjectstorage.inc.
References rewind().
Referenced by offsetUnset().

| SplObjectStorage::getInfo | ( | ) |
Definition at line 60 of file splobjectstorage.inc.
References current().

| SplObjectStorage::key | ( | ) |
Implements Iterator.
Definition at line 44 of file splobjectstorage.inc.
References $index.
Referenced by valid().
| SplObjectStorage::next | ( | ) |
| SplObjectStorage::offsetEsists | ( | $obj | ) |
| $obj | object to look for |
Definition at line 182 of file splobjectstorage.inc.
References contains().

|
inherited |
| $offset | to check |
Implemented in ArrayIterator, ArrayObject, SplDoublyLinkedList, and DbaArray.
| SplObjectStorage::offsetGet | ( | $obj | ) |
| $obj | Exising object to look for |
| UnexpectedValueException | if Object $obj is not contained in storage |
Implements ArrayAccess.
Definition at line 155 of file splobjectstorage.inc.
| SplObjectStorage::offsetSet | ( | $obj, | |
| $inf | |||
| ) |
| $obj | new object to attach to storage or object whose associative information is to be replaced |
| $inf | associative information stored along the object |
Implements ArrayAccess.
Definition at line 144 of file splobjectstorage.inc.
References attach().

| SplObjectStorage::offsetUnset | ( | $obj | ) |
| $obj | Exising object to look for |
Implements ArrayAccess.
Definition at line 174 of file splobjectstorage.inc.
References detach().

| SplObjectStorage::rewind | ( | ) |
Rewind to top iterator as set in constructor.
Implements Iterator.
Definition at line 30 of file splobjectstorage.inc.
Referenced by detach().
| SplObjectStorage::setInfo | ( | $inf = NULL | ) |
Definition at line 69 of file splobjectstorage.inc.
References $index, and valid().

| SplObjectStorage::valid | ( | ) |
Implements Iterator.
Definition at line 37 of file splobjectstorage.inc.
References key().
Referenced by setInfo().

|
private |
Definition at line 26 of file splobjectstorage.inc.
|
private |
Definition at line 25 of file splobjectstorage.inc.
1.8.5