1 | <?php |
||
14 | final class ServiceLocator |
||
15 | { |
||
16 | /** |
||
17 | * @var Container |
||
18 | */ |
||
19 | private $container; |
||
20 | |||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private $serviceByTypeMap; |
||
25 | |||
26 | 3 | public function __construct(Container $container) |
|
30 | |||
31 | 2 | public function setServiceByTypeMap(array $serviceByTypeMap) |
|
35 | |||
36 | /** |
||
37 | * @return object|false |
||
38 | */ |
||
39 | 2 | public function getByType(string $type) |
|
50 | |||
51 | 1 | public function hasByType(string $type) : bool |
|
55 | } |
||
56 |