1 | <?php declare (strict_types=1); |
||
18 | class Registry implements RegistryInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array $registry |
||
22 | */ |
||
23 | protected $registry = []; |
||
24 | |||
25 | /** |
||
26 | * Saves an object to the registry |
||
27 | * |
||
28 | * @param string $object |
||
29 | * @param variadic $options |
||
30 | * @return void |
||
31 | */ |
||
32 | public function save(string $object, ...$options) |
||
40 | |||
41 | /** |
||
42 | * removes an object from the registry |
||
43 | * |
||
44 | * @param string $object |
||
45 | * @return void |
||
46 | */ |
||
47 | public function remove(string $object) : bool |
||
55 | |||
56 | /** |
||
57 | * determines if an object exists in the registry |
||
58 | * |
||
59 | * @param string $object |
||
60 | * @return boolean |
||
61 | */ |
||
62 | public function exists(string $object) : bool |
||
66 | |||
67 | /** |
||
68 | * retrieves an object index from the registry |
||
69 | * |
||
70 | * @param string $object |
||
71 | * @return mixed |
||
72 | */ |
||
73 | public function get(string $object) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function getRegistry() : array |
||
85 | |||
86 | /** |
||
87 | * returns the names of objects stored in the registry |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getRegistryNames() : array |
||
101 | } |
||
102 |