1 | <?php |
||
14 | class Registry |
||
15 | { |
||
16 | /** |
||
17 | * @var ManagerInterface[] |
||
18 | */ |
||
19 | protected $managers = []; |
||
20 | |||
21 | /** |
||
22 | * Add a manager for a class name |
||
23 | * |
||
24 | * @param string $key |
||
25 | * @param ManagerInterface $manager |
||
26 | */ |
||
27 | public function add($key, ManagerInterface $manager) |
||
31 | |||
32 | /** |
||
33 | * Returns a manager |
||
34 | * |
||
35 | * @param string $key |
||
36 | * |
||
37 | * @return ManagerInterface |
||
38 | */ |
||
39 | public function get($key) |
||
43 | |||
44 | /** |
||
45 | * Returns a manager for a configuration |
||
46 | * |
||
47 | * @param ConfigurationInterface $configuration |
||
48 | * |
||
49 | * @return ManagerInterface |
||
50 | */ |
||
51 | public function getFromConfiguration(ConfigurationInterface $configuration) |
||
57 | } |
||
58 |