1 | <?php |
||
8 | class Container implements ContainerInterface |
||
9 | { |
||
10 | /** @var \Closure[] */ |
||
11 | private $serviceFactories = []; |
||
12 | |||
13 | /** @var array */ |
||
14 | private $services = []; |
||
15 | |||
16 | /** @var ContainerInterface */ |
||
17 | private $delegateContainer; |
||
18 | |||
19 | /** |
||
20 | * @param \Closure[] $serviceFactories |
||
21 | */ |
||
22 | public function __construct(array $serviceFactories = []) |
||
28 | |||
29 | /** |
||
30 | * @param string $serviceId |
||
31 | * @param \Closure $serviceFactory |
||
32 | */ |
||
33 | public function set($serviceId, \Closure $serviceFactory) |
||
38 | |||
39 | /** |
||
40 | * @param string $path |
||
41 | */ |
||
42 | public function configureFromFile(string $path) |
||
48 | |||
49 | /** |
||
50 | * @throws NotFoundException |
||
51 | * |
||
52 | * @param string $serviceId |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function get($serviceId) |
||
67 | |||
68 | /** |
||
69 | * @return string[] |
||
70 | */ |
||
71 | public function listServiceIds() : array |
||
75 | |||
76 | /** |
||
77 | * @return mixed |
||
78 | */ |
||
79 | private function getServiceFromFactory(string $serviceId) |
||
85 | |||
86 | /** |
||
87 | * @param string $serviceId |
||
88 | * @return bool |
||
89 | */ |
||
90 | public function has($serviceId) |
||
94 | |||
95 | public function setDelegateContainer(ContainerInterface $delegateContainer) |
||
99 | } |
||
100 |