BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
SplObjectStorage Class Reference
Inheritance diagram for SplObjectStorage:
Collaboration diagram for SplObjectStorage:

Public Member Functions

 attach ($object, $data=null)
 
 detach ($object)
 
 contains ($object)
 
 addAll ($storage)
 
 removeAll ($storage)
 
 removeAllExcept ($storage)
 
 getInfo ()
 
 setInfo ($data)
 
 count ()
 
 rewind ()
 
 valid ()
 
 key ()
 
 current ()
 
 next ()
 
 unserialize ($serialized)
 
 serialize ()
 
 offsetExists ($object)
 
 offsetSet ($object, $data=null)
 
 offsetUnset ($object)
 
 offsetGet ($object)
 
 getHash ($object)
 

Detailed Description

The SplObjectStorage class provides a map from objects to data or, by ignoring data, an object set. This dual purpose can be useful in many cases involving the need to uniquely identify objects. http://php.net/manual/en/class.splobjectstorage.php

Member Function Documentation

SplObjectStorage::addAll (   $storage)

Adds all objects from another storage SplObjectStorage $storage The storage you want to import.

Returns
void
Since
5.3.0
SplObjectStorage::attach (   $object,
  $data = null 
)

Adds an object in the storage object $object The object to add.

Parameters
mixed$data[optional]

The data to associate with the object.

Returns
void
Since
5.1.0
SplObjectStorage::contains (   $object)

Checks if the storage contains a specific object object $object The object to look for.

Returns
bool true if the object is in the storage, false otherwise.
Since
5.1.0
SplObjectStorage::count ( )

Returns the number of objects in the storage int The number of objects in the storage. 5.1.0

Implements Countable.

SplObjectStorage::current ( )

Returns the current storage entry object The object at the current iterator position. 5.1.0

Implements Iterator.

SplObjectStorage::detach (   $object)

Removes an object from the storage object $object The object to remove.

Returns
void
Since
5.1.0
SplObjectStorage::getHash (   $object)

Calculate a unique identifier for the contained objects $object object whose identifier is to be calculated.

Returns
string A string with the calculated identifier.
Since
5.4.0
SplObjectStorage::getInfo ( )

Returns the data associated with the current iterator entry mixed The data associated with the current iterator position. 5.3.0

SplObjectStorage::key ( )

Returns the index at which the iterator currently is int The index corresponding to the position of the iterator. 5.1.0

Implements Iterator.

SplObjectStorage::next ( )

Move to the next entry void 5.1.0

Implements Iterator.

SplObjectStorage::offsetExists (   $object)

Checks whether an object exists in the storage object $object The object to look for.

Returns
bool true if the object exists in the storage, and false otherwise.
Since
5.3.0

Implements ArrayAccess.

SplObjectStorage::offsetGet (   $object)

Returns the data associated with an <type>object</type> object $object The object to look for.

Returns
mixed The data previously associated with the object in the storage.
Since
5.3.0

Implements ArrayAccess.

SplObjectStorage::offsetSet (   $object,
  $data = null 
)

Associates data to an object in the storage object $object The object to associate data with.

Parameters
mixed$data[optional]

The data to associate with the object.

Returns
void
Since
5.3.0

Implements ArrayAccess.

SplObjectStorage::offsetUnset (   $object)

Removes an object from the storage object $object The object to remove.

Returns
void
Since
5.3.0

Implements ArrayAccess.

SplObjectStorage::removeAll (   $storage)

Removes objects contained in another storage from the current storage SplObjectStorage $storage The storage containing the elements to remove.

Returns
void
Since
5.3.0
SplObjectStorage::removeAllExcept (   $storage)

Removes all objects except for those contained in another storage from the current storage SplObjectStorage $storage The storage containing the elements to retain in the current storage.

Returns
void
Since
5.3.6
SplObjectStorage::rewind ( )

Rewind the iterator to the first storage element void 5.1.0

Implements Iterator.

SplObjectStorage::serialize ( )
SplObjectStorage::setInfo (   $data)

Sets the data associated with the current iterator entry mixed $data The data to associate with the current iterator entry.

Returns
void
Since
5.3.0
SplObjectStorage::unserialize (   $serialized)

Unserializes a storage from its string representation string $serialized The serialized representation of a storage.

Returns
void
Since
5.2.2

Implements Serializable.

SplObjectStorage::valid ( )

Returns if the current iterator entry is valid bool true if the iterator entry is valid, false otherwise. 5.1.0

Implements Iterator.


The documentation for this class was generated from the following file: