SplObjectStorage
class SplObjectStorage implements Countable, SeekableIterator, Serializable, ArrayAccess (View source)
Methods
Adds an object in the storage
Removes an object from the storage
Checks if the storage contains a specific object
Adds all objects from another storage
Removes objects contained in another storage from the current storage
Removes all objects except for those contained in another storage from the current storage
Returns the data associated with the current iterator entry
Sets the data associated with the current iterator entry
Returns the number of objects in the storage
Rewind the iterator to the first storage element
Returns if the current iterator entry is valid
Returns the index at which the iterator currently is
Returns the current storage entry
Move to the next entry
Unserializes a storage from its string representation
Serializes the storage
Checks whether an object exists in the storage
Associates data to an object in the storage
Removes an object from the storage
Returns the data associated with an
Calculate a unique identifier for the contained objects
No description
No description
No description
No description
Details
void
attach(TObject $object, TValue $info = null)
Adds an object in the storage
void
detach(TObject $object)
Removes an object from the storage
bool
contains(TObject $object)
Checks if the storage contains a specific object
int
addAll(TValue> $storage)
Adds all objects from another storage
int
removeAll(TValue> $storage)
Removes objects contained in another storage from the current storage
int
removeAllExcept(TValue> $storage)
Removes all objects except for those contained in another storage from the current storage
mixed
getInfo()
Returns the data associated with the current iterator entry
void
setInfo(TValue $info)
Sets the data associated with the current iterator entry
int
count(int $mode = COUNT_NORMAL)
Returns the number of objects in the storage
void
rewind()
Rewind the iterator to the first storage element
bool
valid()
Returns if the current iterator entry is valid
mixed
key()
Returns the index at which the iterator currently is
mixed
current()
Returns the current storage entry
void
next()
Move to the next entry
void
unserialize(string $data)
Unserializes a storage from its string representation
string|null
serialize()
Serializes the storage
bool
offsetExists(TObject $object)
Checks whether an object exists in the storage
void
offsetSet(TObject $object, TValue $info = null)
Associates data to an object in the storage
void
offsetUnset(TObject $object)
Removes an object from the storage
mixed
offsetGet(TObject $object)
Returns the data associated with an
string
getHash(TObject $object)
Calculate a unique identifier for the contained objects
array
__serialize()
No description
void
__unserialize(array $data)
No description
array
__debugInfo()
No description
void
seek(int $offset)
No description