Method |
Description |
|
add ( $key, $value ) : static |
Adds the key-value pair containing $key and $value to the dictionary. |
|
clear ( ) : static |
Removes every key-value pair from the dictionary. |
|
count ( ) : integer |
Returns the number of key-value pairs in the dictionary. |
|
delete ( $key ) : static |
Removes the key-value pair represented by $key from the dictionary. |
|
each ( callable $callable ) |
Applies the callback function $callable to each key-value pair in the
dictionary. |
|
exists ( $key ) : boolean |
Returns true if $key is in the dictionary, returns false if it is not. |
|
filter ( callable $condition ) : static |
Returns a dictionary that only contains the key-value pairs which satisfy
$condition. |
|
get ( $key ) : mixed |
Returns the value associated with $key. |
|
getKeyType ( ) : string |
Returns the type of the dictionary's keys. |
|
getOrElse ( $key, $default ) : mixed |
Returns the value associated with $key in the dictionary, returns
$default if it does not. |
|
getValueType ( ) : string |
Returns the type of the dictionary's values. |
|
keys ( ) : array |
Returns an array of all keys in the dictionary. |
|
map ( callable $callable ) : static |
Returns a new dictionary with the callback function $callable applied to
every key-value pair in the dictionary. |
|
merge ( $newItems ) : static |
Adds every key-value pair in $newItems to the dictionary. |
|
toArray ( ) : array |
Returns the key-value pairs in the dictionary as an associative array. |
|
valueExists ( $value ) : boolean |
Returns true if $value is in the dictionary, returns false if not. |
|
values ( ) : array |
Returns an array of all values in the dictionary. |
|
without ( callable $condition ) : static |
Removes all key-value pairs from the Dictionary that do not satisfy
$condition. |
|