1 | <?php |
||
27 | abstract class AbstractMap |
||
28 | extends AbstractCollection |
||
29 | implements Map |
||
30 | { |
||
31 | /** |
||
32 | * Adds an element to the Map |
||
33 | * |
||
34 | * @param KeyType $key The key to add |
||
35 | * @param ValueType $value The value to add |
||
36 | */ |
||
37 | 40 | public function offsetSet($key, $value) |
|
41 | |||
42 | /** |
||
43 | * Adds an element to the Map |
||
44 | * |
||
45 | * @param KeyType $key The key to add |
||
46 | * @param ValueType $value The value to add |
||
47 | */ |
||
48 | 43 | public function add($key, $value) |
|
52 | |||
53 | /** |
||
54 | * Checks if a key exists |
||
55 | * |
||
56 | * @param KeyType $key The key to search for |
||
57 | * @return boolean |
||
58 | */ |
||
59 | public function offsetExists($key) : bool |
||
63 | |||
64 | /** |
||
65 | * Removes an item from the map |
||
66 | * |
||
67 | * @param KeyType $key The key of the keypair to remove |
||
68 | */ |
||
69 | public function offsetUnset($key) |
||
73 | |||
74 | /** |
||
75 | * Gets an item from the map, looking it up by the specified key |
||
76 | * |
||
77 | * @param KeyType $key |
||
78 | * @return ValueType |
||
79 | */ |
||
80 | 49 | public function offsetGet($key) |
|
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | 49 | public function get($key) |
|
92 | } |
||
93 |