1 | <?php |
||
25 | abstract class AbstractMap |
||
26 | extends AbstractCollection |
||
27 | implements MapInterface |
||
28 | { |
||
29 | /** |
||
30 | * Adds an element to the Map |
||
31 | * |
||
32 | * @param KeyType $key The key to add |
||
33 | * @param ValueType $value The value to add |
||
34 | */ |
||
35 | 32 | public function offsetSet($key, $value) |
|
39 | |||
40 | /** |
||
41 | * Adds an element to the Map |
||
42 | * |
||
43 | * @param KeyType $key The key to add |
||
44 | * @param ValueType $value The value to add |
||
45 | */ |
||
46 | 35 | public function add($key, $value) |
|
50 | |||
51 | /** |
||
52 | * Checks if a key exists |
||
53 | * |
||
54 | * @param KeyType $key The key to search for |
||
55 | * @return boolean |
||
56 | */ |
||
57 | public function offsetExists($key) : bool |
||
61 | |||
62 | /** |
||
63 | * Removes an item from the map |
||
64 | * |
||
65 | * @param KeyType $key The key of the keypair to remove |
||
66 | */ |
||
67 | public function offsetUnset($key) |
||
71 | |||
72 | /** |
||
73 | * Gets an item from the map, looking it up by the specified key |
||
74 | * |
||
75 | * @param KeyType $key |
||
76 | * @return ValueType |
||
77 | */ |
||
78 | 41 | public function offsetGet($key) |
|
82 | |||
83 | /** |
||
84 | * {@inheritDoc} |
||
85 | */ |
||
86 | 41 | public function get($key) |
|
90 | } |
||
91 |