1 | <?php |
||
21 | class RegistryContainer implements ArrayAccess, CountableTraversableAggregate |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var array $container |
||
26 | */ |
||
27 | private $container; |
||
28 | |||
29 | /** |
||
30 | * RegistryContainer constructor. |
||
31 | * Container data can be seeded by passing parameters to constructor. |
||
32 | * Each parameter will become its own element in the container |
||
33 | */ |
||
34 | public function __construct() |
||
41 | |||
42 | |||
43 | /** |
||
44 | * @param mixed $offset |
||
45 | * @param mixed $value |
||
46 | */ |
||
47 | public function offsetSet($offset, $value) |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @param mixed $offset |
||
55 | * @return bool |
||
56 | */ |
||
57 | public function offsetExists($offset) |
||
61 | |||
62 | |||
63 | /** |
||
64 | * @param mixed $offset |
||
65 | */ |
||
66 | public function offsetUnset($offset) |
||
70 | |||
71 | |||
72 | /** |
||
73 | * @param mixed $offset |
||
74 | * @return mixed|null |
||
75 | */ |
||
76 | public function offsetGet($offset) |
||
80 | |||
81 | |||
82 | /** |
||
83 | * @return int |
||
84 | */ |
||
85 | public function count() |
||
89 | |||
90 | |||
91 | /** |
||
92 | * @return ArrayIterator |
||
93 | */ |
||
94 | public function getIterator() |
||
98 | |||
99 | |||
100 | /** |
||
101 | * @param $offset |
||
102 | * @param $value |
||
103 | */ |
||
104 | public function __set($offset, $value) |
||
108 | |||
109 | |||
110 | /** |
||
111 | * @param $offset |
||
112 | * @return mixed |
||
113 | * @throws OutOfBoundsException |
||
114 | */ |
||
115 | public function __get($offset) |
||
131 | |||
132 | |||
133 | /** |
||
134 | * @param $offset |
||
135 | * @return bool |
||
136 | */ |
||
137 | public function __isset($offset) |
||
141 | |||
142 | |||
143 | /** |
||
144 | * @param $offset |
||
145 | */ |
||
146 | public function __unset($offset) |
||
150 | |||
151 | } |
||
152 | // Location: RegistryContainer.php |
||
153 |