1 | <?php |
||
21 | class Store extends \PEIP\Data\ArrayAccess implements \PEIP\INF\Data\Store |
||
22 | { |
||
23 | /** |
||
24 | * Sets a value for a given key. |
||
25 | * |
||
26 | * @param mixed $key the key to store value for |
||
27 | * @param mixed $value the value to store |
||
28 | * |
||
29 | * @return |
||
30 | */ |
||
31 | public function setValue($key, $value) |
||
35 | |||
36 | /** |
||
37 | * returns the value for a given key. |
||
38 | * |
||
39 | * @param mixed $key the key to return value for |
||
40 | * |
||
41 | * @return mixed the value for the given key |
||
42 | */ |
||
43 | public function getValue($key) |
||
47 | |||
48 | /** |
||
49 | * Unsets the value for a given key. |
||
50 | * |
||
51 | * @param mixed $key the key to unset value for |
||
52 | * |
||
53 | * @return |
||
54 | */ |
||
55 | public function deleteValue($key) |
||
59 | |||
60 | /** |
||
61 | * Checks wether a value is stored for given key. |
||
62 | * |
||
63 | * @param mixed $key the key to look for a value |
||
64 | * |
||
65 | * @return bool wether a value is stored for the key |
||
66 | */ |
||
67 | public function hasValue($key) |
||
71 | |||
72 | /** |
||
73 | * Sets all values for the store as key/value pair array. |
||
74 | * |
||
75 | * @param array $values key/value pairs to store |
||
76 | * |
||
77 | * @return |
||
78 | */ |
||
79 | public function setValues(array $values) |
||
83 | |||
84 | /** |
||
85 | * returns all values for the store as key/value pairs. |
||
86 | * |
||
87 | * @return array stored key/value pairs |
||
88 | */ |
||
89 | public function getValues() |
||
93 | |||
94 | /** |
||
95 | * Adds values for the store as key/value pair array. |
||
96 | * Overwrites value for a key if allready has been set. |
||
97 | * |
||
98 | * @param $values |
||
99 | * |
||
100 | * @return |
||
101 | */ |
||
102 | public function addValues(array $values) |
||
106 | } |
||
107 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.