1 | <?php |
||
12 | class ContainerEntityListenerResolver implements EntityListenerServiceResolver |
||
13 | { |
||
14 | /** @var ContainerInterface */ |
||
15 | private $container; |
||
16 | |||
17 | /** @var object[] Map to store entity listener instances. */ |
||
18 | private $instances = []; |
||
19 | |||
20 | /** @var string[] Map to store registered service ids */ |
||
21 | private $serviceIds = []; |
||
22 | |||
23 | /** |
||
24 | * @param ContainerInterface $container a service locator for listeners |
||
25 | */ |
||
26 | public function __construct(ContainerInterface $container) |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function clear($className = null) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function register($object) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function registerService($className, $serviceId) |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function resolve($className) |
||
86 | |||
87 | /** |
||
88 | * @return object |
||
89 | */ |
||
90 | private function resolveService(string $serviceId) |
||
98 | |||
99 | private function normalizeClassName(string $className) : string |
||
103 | } |
||
104 |