SplObjectStorage::offsetGet
Returns the data associated with an object
&reftitle.description;
public mixedSplObjectStorage::offsetGet
objectobject
Returns the data associated with an object in the storage.
&reftitle.parameters;
object
The object to look for.
&reftitle.returnvalues;
The data previously associated with the object in the storage.
&reftitle.errors;
Throws UnexpectedValueException when object could not be found.
&reftitle.examples;
SplObjectStorage::offsetGet example
attach($o2);
var_dump($s->offsetGet($o1)); // Similar to $s[$o1]
var_dump($s->offsetGet($o2)); // Similar to $s[$o2]
?>
]]>
&example.outputs.similar;
&reftitle.seealso;
SplObjectStorage::offsetSet
SplObjectStorage::offsetExists
SplObjectStorage::offsetUnset