TYPO3
7.6
|
Public Member Functions | |
rewind () | |
valid () | |
key () | |
current () | |
next () | |
count () | |
offsetSet ($object, $information) | |
offsetExists ($object) | |
offsetUnset ($object) | |
offsetGet ($object) | |
contains ($object) | |
attach ($object, $information=null) | |
detach ($object) | |
getInfo () | |
setInfo ($data) | |
addAll (ObjectStorage $objectStorage) | |
removeAll (ObjectStorage $objectStorage) | |
toArray () | |
serialize () | |
unserialize ($serialized) | |
_memorizeCleanState () | |
_isDirty () | |
isRelationDirty ($object) | |
getPosition ($object) | |
Protected Attributes | |
$storage = array() | |
$isModified = false | |
$addedObjectsPositions = array() | |
$removedObjectsPositions = array() | |
$positionCounter = 0 | |
Private Attributes | |
$warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.' | |
The storage for objects. It ensures the uniqueness of an object in the storage. It's a remake of the SplObjectStorage introduced in PHP 5.3.
Opposed to the SplObjectStorage the ObjectStorage does not implement the Serializable interface.
Definition at line 23 of file ObjectStorage.php.
_isDirty | ( | ) |
Returns TRUE if the storage was modified after reconstitution.
Implements ObjectMonitoringInterface.
Definition at line 339 of file ObjectStorage.php.
References ObjectStorage\$isModified.
_memorizeCleanState | ( | ) |
Register the storage's clean state, e.g. after it has been reconstituted from the database.
Implements ObjectMonitoringInterface.
Definition at line 329 of file ObjectStorage.php.
Referenced by LazyObjectStorage\initialize().
addAll | ( | ObjectStorage | $objectStorage | ) |
Adds all objects-data pairs from a different storage in the current storage.
ObjectStorage | $objectStorage |
Definition at line 266 of file ObjectStorage.php.
References ObjectStorage\attach(), and ObjectStorage\getInfo().
attach | ( | $object, | |
$information = null |
|||
) |
Adds an object in the storage, and optionaly associate it to some data.
object | $object | The object to add. |
mixed | $information | The data to associate with the object. |
Definition at line 220 of file ObjectStorage.php.
References ObjectStorage\offsetSet().
Referenced by ObjectStorage\addAll().
contains | ( | $object | ) |
Checks if the storage contains a specific object.
object | $object | The object to look for. |
Definition at line 208 of file ObjectStorage.php.
References ObjectStorage\offsetExists().
count | ( | ) |
Returns the number of objects in the storage.
Definition at line 140 of file ObjectStorage.php.
current | ( | ) |
Returns the current storage entry.
Definition at line 119 of file ObjectStorage.php.
Referenced by ObjectStorage\getInfo(), and ObjectStorage\valid().
detach | ( | $object | ) |
Removes an object from the storage.
object | $object | The object to remove. |
Definition at line 231 of file ObjectStorage.php.
References ObjectStorage\offsetUnset().
Referenced by ObjectStorage\removeAll().
getInfo | ( | ) |
Returns the data, or info, associated with the object pointed by the current iterator position.
Definition at line 241 of file ObjectStorage.php.
References ObjectStorage\current().
Referenced by ObjectStorage\addAll().
getPosition | ( | $object | ) |
isRelationDirty | ( | $object | ) |
Returns TRUE if an object is added, then removed and added at a different position
mixed | $object |
Definition at line 350 of file ObjectStorage.php.
key | ( | ) |
Returns the index at which the iterator currently is.
This is different from the SplObjectStorage as the key in this implementation is the object hash (string).
Definition at line 109 of file ObjectStorage.php.
Referenced by ObjectStorage\setInfo().
next | ( | ) |
offsetExists | ( | $object | ) |
Checks whether an object exists in the storage.
object | $object | The object to look for. |
Definition at line 167 of file ObjectStorage.php.
Referenced by ObjectStorage\contains().
offsetGet | ( | $object | ) |
Returns the data associated with an object.
object | $object | The object to look for. |
Definition at line 197 of file ObjectStorage.php.
offsetSet | ( | $object, | |
$information | |||
) |
Associates data to an object in the storage. offsetSet() is an alias of attach().
object | $object | The object to add. |
mixed | $information | The data to associate with the object. |
Definition at line 152 of file ObjectStorage.php.
References ObjectStorage\$positionCounter.
Referenced by ObjectStorage\attach().
offsetUnset | ( | $object | ) |
Removes an object from the storage. offsetUnset() is an alias of detach().
object | $object | The object to remove. |
Definition at line 178 of file ObjectStorage.php.
Referenced by ObjectStorage\detach().
removeAll | ( | ObjectStorage | $objectStorage | ) |
Removes objects contained in another storage from the current storage.
ObjectStorage | $objectStorage | The storage containing the elements to remove. |
Definition at line 279 of file ObjectStorage.php.
References ObjectStorage\detach().
rewind | ( | ) |
Rewinds the iterator to the first storage element.
Definition at line 87 of file ObjectStorage.php.
serialize | ( | ) |
Dummy method to avoid serialization.
\RuntimeException |
Definition at line 307 of file ObjectStorage.php.
setInfo | ( | $data | ) |
Associates data, or info, with the object currently pointed to by the iterator.
mixed | $data |
Definition at line 253 of file ObjectStorage.php.
References ObjectStorage\key().
toArray | ( | ) |
Returns this object storage as an array
Definition at line 291 of file ObjectStorage.php.
References ObjectStorage\$storage.
unserialize | ( | $serialized | ) |
Dummy method to avoid unserialization.
string | $serialized |
\RuntimeException |
Definition at line 319 of file ObjectStorage.php.
valid | ( | ) |
Checks if the array pointer of the storage points to a valid position.
Definition at line 97 of file ObjectStorage.php.
References ObjectStorage\current().
|
protected |
Definition at line 64 of file ObjectStorage.php.
|
protected |
Definition at line 56 of file ObjectStorage.php.
Referenced by ObjectStorage\_isDirty().
|
protected |
Definition at line 80 of file ObjectStorage.php.
Referenced by ObjectStorage\offsetSet().
|
protected |
Definition at line 72 of file ObjectStorage.php.
|
protected |
Definition at line 49 of file ObjectStorage.php.
Referenced by ObjectStorage\toArray().
|
private |
Definition at line 33 of file ObjectStorage.php.