1 | <?php |
||
14 | class Registry |
||
15 | { |
||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | protected $container; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $configurations = array(); |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | * |
||
29 | * @param ContainerInterface $container |
||
30 | */ |
||
31 | public function __construct(ContainerInterface $container) |
||
35 | |||
36 | /** |
||
37 | * Returns true if a configuration with the corresponding name exists |
||
38 | * |
||
39 | * @param string $name |
||
40 | * |
||
41 | * @return boolean |
||
42 | */ |
||
43 | public function has($name) |
||
47 | |||
48 | /** |
||
49 | * Get a configuration |
||
50 | * |
||
51 | * @param string $name |
||
52 | * |
||
53 | * @return ConfigurationInterface |
||
54 | */ |
||
55 | public function get($name) |
||
59 | |||
60 | /** |
||
61 | * Add a configuration |
||
62 | * |
||
63 | * @param string $name |
||
64 | * @param string $serviceId |
||
65 | */ |
||
66 | public function add($name, $serviceId) |
||
70 | } |
||
71 |