| 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 | 1 | public function __construct(Container $container) |
|
| 30 | |||
| 31 | public function setServiceByTypeMap(array $serviceByTypeMap) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return object|false |
||
| 38 | */ |
||
| 39 | public function getByType(string $type) |
||
| 50 | |||
| 51 | public function hasByType(string $type) : bool |
||
| 55 | } |
||
| 56 |