1 | <?php |
||
9 | class ContainerEntityListenerResolver implements EntityListenerServiceResolver |
||
10 | { |
||
11 | /** @var ContainerInterface */ |
||
12 | private $container; |
||
13 | |||
14 | /** @var object[] Map to store entity listener instances. */ |
||
15 | private $instances = []; |
||
16 | |||
17 | /** @var string[] Map to store registered service ids */ |
||
18 | private $serviceIds = []; |
||
19 | |||
20 | /** |
||
21 | * @param ContainerInterface $container a service locator for listeners |
||
22 | */ |
||
23 | public function __construct(ContainerInterface $container) |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function clear($className = null) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function register($object) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function registerService($className, $serviceId) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function resolve($className) |
||
83 | |||
84 | /** |
||
85 | * @return object |
||
86 | */ |
||
87 | private function resolveService(string $serviceId) |
||
95 | |||
96 | private function normalizeClassName(string $className) : string |
||
100 | } |
||
101 |