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) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function register($object) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function registerService($className, $serviceId) |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function resolve($className) |
||
87 | |||
88 | /** |
||
89 | * @param string $serviceId |
||
90 | * |
||
91 | * @return object |
||
92 | */ |
||
93 | private function resolveService($serviceId) |
||
101 | |||
102 | /** |
||
103 | * @param string $className |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | private function normalizeClassName($className) |
||
111 | } |
||
112 |