PHP Class WeakMap, ClearSky

Inheritance: implements Countable, implements ArrayAccess, implements Iterator
Show file Open project: robske110/ClearSky

Public Methods

Method Description
__construct ( ) Constructs a new map
count ( ) : integer Counts the number of live entries in the map
current ( ) : mixed Returns the current value being iterated on in the map.
key ( ) : mixed Returns the object serving as key in the map, at the current iterating position.
next ( ) Advances to the next map element.
offsetExists ( object $object ) : boolean Checks whether the passed object is referenced in the map.
offsetGet ( object $object ) : mixed Returns the value pointed to by a certain object.
offsetSet ( object $object, mixed $value ) Updates the map with a new key-value pair.
offsetUnset ( object $object ) Removes an entry from the map.
rewind ( ) Rewinds the iterator to the beginning of the map.
valid ( ) : boolean Returns whether the iterator is still on a valid map element.

Method Details

__construct() public method

Constructs a new map
public __construct ( )

count() public method

Counts the number of live entries in the map
public count ( ) : integer
return integer

current() public method

Returns the current value being iterated on in the map.
public current ( ) : mixed
return mixed

key() public method

Returns the object serving as key in the map, at the current iterating position.
public key ( ) : mixed
return mixed

next() public method

Advances to the next map element.
public next ( )

offsetExists() public method

Checks whether the passed object is referenced in the map.
public offsetExists ( object $object ) : boolean
$object object
return boolean

offsetGet() public method

Returns the value pointed to by a certain object.
public offsetGet ( object $object ) : mixed
$object object
return mixed

offsetSet() public method

If the key already existed in the map, the old value is replaced with the new.
public offsetSet ( object $object, mixed $value )
$object object
$value mixed

offsetUnset() public method

Removes an entry from the map.
public offsetUnset ( object $object )
$object object

rewind() public method

Rewinds the iterator to the beginning of the map.
public rewind ( )

valid() public method

Returns whether the iterator is still on a valid map element.
public valid ( ) : boolean
return boolean