1 | <?php |
||
12 | class ServiceContainer implements ContainerInterface, \ArrayAccess |
||
13 | { |
||
14 | /** @var PimpleContainer */ |
||
15 | private $pimpleContainer; |
||
16 | |||
17 | /** |
||
18 | * @param PimpleContainer|null $pimpleContainer |
||
19 | */ |
||
20 | public function __construct(PimpleContainer $pimpleContainer = null) |
||
24 | |||
25 | /** |
||
26 | * @param ServiceProviderInterface $serviceProvider |
||
27 | * @return ServiceContainer |
||
28 | */ |
||
29 | public static function constructConfiguredWith(ServiceProviderInterface $serviceProvider) |
||
35 | |||
36 | /** |
||
37 | * @param ServiceProviderInterface $pimpleServiceProvider |
||
38 | */ |
||
39 | public function addConfig(ServiceProviderInterface $pimpleServiceProvider) |
||
43 | |||
44 | /** |
||
45 | * @throws NotFoundExceptionInterface |
||
46 | * @throws ContainerExceptionInterface |
||
47 | * |
||
48 | * @param string $serviceId |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function get($serviceId) |
||
62 | |||
63 | /** |
||
64 | * @param string $serviceId |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function has($serviceId) |
||
71 | |||
72 | public function offsetGet($serviceId) |
||
76 | |||
77 | public function offsetExists($serviceId) |
||
81 | |||
82 | public function offsetUnset($serviceId) |
||
86 | |||
87 | public function offsetSet($serviceId, $value) |
||
91 | |||
92 | public function __call($name, $arguments) |
||
96 | } |
||
97 |