1 | <?php |
||
36 | class ehough_chaingang_impl_StandardContext implements ehough_chaingang_api_Context |
||
37 | { |
||
38 | private $_map = array(); |
||
39 | |||
40 | /** |
||
41 | * Removes all mappings from this map. |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | 1 | public final function clear() |
|
49 | |||
50 | /** |
||
51 | * Returns true if this map contains a mapping for the specified key. |
||
52 | * |
||
53 | * @param string $key Key whose presence in this map is to be tested. |
||
54 | * |
||
55 | * @return bool True if this map contains a mapping for the specified key, false otherwise. |
||
56 | */ |
||
57 | 3 | public final function containsKey($key) |
|
61 | |||
62 | /** |
||
63 | * Returns true if this map maps one or more keys to the specified value. |
||
64 | * |
||
65 | * @param mixed $value Value whose presence in this map is to be tested. |
||
66 | * |
||
67 | * @return bool True if this map maps one or more keys to the specified value. |
||
68 | */ |
||
69 | 2 | public final function containsValue($value) |
|
73 | |||
74 | /** |
||
75 | * Returns the value to which this map maps the specified key. |
||
76 | * |
||
77 | * Returns null if the map contains no mapping for this key. A return value of null |
||
78 | * does not necessarily indicate that the map contains no mapping for the key; it's |
||
79 | * also possible that the map explicitly maps the key to null. The containsKey |
||
80 | * operation may be used to distinguish these two cases. |
||
81 | * |
||
82 | * @param string $key Key whose associated value is to be returned. |
||
83 | * |
||
84 | * @return mixed The value to which this map maps the specified key, or null if the |
||
85 | * map contains no mapping for this key. |
||
86 | */ |
||
87 | 2 | public final function get($key) |
|
96 | |||
97 | /** |
||
98 | * Returns true if this map contains no key-value mappings. |
||
99 | * |
||
100 | * @return bool True if this map contains no key-value mappings. |
||
101 | */ |
||
102 | 2 | public final function isEmpty() |
|
106 | |||
107 | /** |
||
108 | * Associates the specified value with the specified key in this map. |
||
109 | * |
||
110 | * If the map previously contained a mapping for this key, the old value |
||
111 | * is replaced by the specified value. |
||
112 | * |
||
113 | * @param string $key Key with which the specified value is to be associated. |
||
114 | * @param mixed $value Value to be associated with the specified key. |
||
115 | * |
||
116 | * @return mixed Previous value associated with specified key, or null if there |
||
117 | * was no mapping for key. A null return can also indicate that |
||
118 | * the map previously associated null with the specified key, if |
||
119 | * the implementation supports null values. |
||
120 | */ |
||
121 | 2 | public final function put($key, $value) |
|
129 | |||
130 | /** |
||
131 | * Copies all of the mappings from the specified map to this map. |
||
132 | * |
||
133 | * The effect of this call is equivalent to that of calling put(k, v) on this map |
||
134 | * once for each mapping from key k to value v in the specified map. |
||
135 | * |
||
136 | * @param array $values Mappings to be stored in this map. |
||
137 | * |
||
138 | * @return void |
||
139 | */ |
||
140 | 1 | public final function putAll(array $values) |
|
152 | |||
153 | /** |
||
154 | * Removes the mapping for this key from this map if it is present. |
||
155 | * |
||
156 | * @param string $key Key whose mapping is to be removed from the map. |
||
157 | * |
||
158 | * @return mixed Previous value associated with specified key, or null if there was no mapping for key. |
||
159 | */ |
||
160 | 1 | public final function remove($key) |
|
171 | |||
172 | /** |
||
173 | * Returns the number of key-value mappings in this map. |
||
174 | * |
||
175 | * @return int The number of key-value mappings in this map. |
||
176 | */ |
||
177 | 2 | public final function size() |
|
181 | } |