Sgss_Collection_Map_Abstract
+ Sgss_Collection_Array_Map
|
$_keys
Keys and the indices of the associated values |
|
$_size
The number of associations in this map |
|
$_values
Values associated with the keys |
|
__construct ([array|object|null $map = null])
The constructor |
boolean |
clear ()
Removes all the keys and the associated values in this map |
mixed |
current ()
|
mixed|null |
get (mixed $key)
Returns the value associated with the specified key |
boolean |
has (mixed $key)
Determines whether this map contains the associated value with the specified key |
boolean |
hasValue (mixed $value)
Determines whether this map contains the specified value |
mixed |
key ()
|
mixed |
next ()
|
boolean |
put (mixed $key, mixed $value)
Inserts or replaces the association between the specified key and value into this map |
boolean |
remove (mixed $key)
Removes the specified key and the associated value from this map |
void |
rewind ()
|
int |
size ()
Returns the number of associations between key and value in this map |
array |
toArray ()
Converts this map to an associated array |
array |
toKeyArray ()
Returns an array containing all the keys in this map |
array |
toValueArray ()
Returns an array containing all the values in this map |
boolean |
valid ()
|
Keys and the indices of the associated values
protected array $_keys
The number of associations in this map
protected int $_size = 0
Values associated with the keys
protected array $_values
The constructor
array|object|null $map
Object containing keys and the asscociated values to be stored
public __construct ([array|object|null $map = null])
Removes all the keys and the associated values in this map
public boolean clear ()
public mixed current ()
Returns the value associated with the specified key
mixed $key
Key associated with the value to be retrieved
public mixed|null get (mixed $key)
Determines whether this map contains the associated value with the specified key
mixed $key
Key to determine
public boolean has (mixed $key)
Determines whether this map contains the specified value
mixed $value
Value to determine
public boolean hasValue (mixed $value)
public mixed key ()
public mixed next ()
Inserts or replaces the association between the specified key and value into this map
mixed $key
Key to be inserted
mixed $value
Value to be inserted and associated with the key
public boolean put (mixed $key, mixed $value)
Removes the specified key and the associated value from this map
mixed $key
Key associated with the value to be removed
public boolean remove (mixed $key)
public void rewind ()
Returns the number of associations between key and value in this map
public int size ()
Converts this map to an associated array
public array toArray ()
Returns an array containing all the keys in this map
public array toKeyArray ()
Returns an array containing all the values in this map
public array toValueArray ()
public boolean valid ()