1 | <?php |
||
10 | class Registry |
||
11 | { |
||
12 | protected $data = array(); |
||
13 | |||
14 | /** |
||
15 | * Flush all stored instances from the registry. |
||
16 | * @return \DICIT\Registry |
||
17 | */ |
||
18 | public function flush() |
||
22 | |||
23 | /** |
||
24 | * Fetches an object from the registry. |
||
25 | * @param string $key |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public function get($key, $throwIfNotFound = false) |
||
40 | |||
41 | /** |
||
42 | * Returns a boolean indicating whether there is an object associated to a given key in the registry. |
||
43 | * @param string $key |
||
44 | * @return boolean |
||
45 | */ |
||
46 | public function has($key) |
||
50 | |||
51 | /** |
||
52 | * Stores an object instance in the registry. |
||
53 | * @param string $key |
||
54 | * @param mixed $value |
||
55 | */ |
||
56 | public function set($key, & $value) |
||
60 | } |
||
61 |