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