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 | public function set(string $serviceId, \Closure $serviceFactory) |
||
34 | |||
35 | public function configureFromFile(string $path) |
||
41 | |||
42 | /** |
||
43 | * @throws NotFoundExceptionInterface |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | public function get(string $serviceId) |
||
59 | |||
60 | /** |
||
61 | * @return string[] |
||
62 | */ |
||
63 | public function listServiceIds() : array |
||
67 | |||
68 | /** |
||
69 | * @return mixed |
||
70 | */ |
||
71 | private function getServiceFromFactory(string $serviceId) |
||
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function has(string $serviceId) |
||
85 | |||
86 | public function setDelegateContainer(ContainerInterface $delegateContainer) |
||
90 | } |
||
91 |