* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Psr\Container\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; /** * Compiler pass to inject their service locator to service subscribers. * * @author Nicolas Grekas */ class ResolveServiceSubscribersPass extends AbstractRecursivePass { private $serviceLocator; protected function processValue($value, $isRoot = false) { if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === $this->container->normalizeId($value)) { return new Reference($this->serviceLocator); } if (!$value instanceof Definition) { return parent::processValue($value, $isRoot); } $serviceLocator = $this->serviceLocator; $this->serviceLocator = $value->hasTag('container.service_subscriber.locator') ? $value->getTag('container.service_subscriber.locator')[0]['id'] : null; try { return parent::processValue($value); } finally { $this->serviceLocator = $serviceLocator; } } } __halt_compiler();----SIGNATURE:----dwiYfdR8Ree+4y30yWEhCvVW0oQU4NviWSmr5dpyrzeY29x2wkVBQeoniohyV6F5N4aYWR77JvBuPLEldJU3megRWAUzvfp/aVMkqArNxurBzczIyx9GQ4fGMIqLxYpHGfq02W3m+yjLnTCAhj+X8DB15yxw+vLZga35RGL2bIFwlB1fjARJqxyE7KmY8sb9UUMKXjrnWcf5DqJbjxCVt0+vikygNqzLWJwp/ZmG0cl8Cqv/u6UUGNolwjp9wnPkhEXSSVloVSvNC/9nsjjETpzQZX2FbVysi4Cf348vLFik5Z70Pe1zKtrSet+E2U5oFfRTV8Sv6dkct8nL3tLcfsi395kpE+8UPD3PU4JnWhKGgU0p0eUqgYE012gN8V5vcMuoCoVi4lkZMnu5UVpfSB2+80C1Go31e4wiVjJKNj8CHsDXuxyqHzto8vZknEedr0rq3kWzp43uA3QPODgVnbtdPZ8ivRUvisMt//E9cC//VRagemQjO+/1+UOHw8bnwostIeunCzgFM/h7iAIzBXZeORzMfME4m4eVO/EEIWzJnau1+aG8c6Y8bXvDxle4RikVMRvNKkdtfCMflrnH6A54GTMc1K7r8nnYywjr7afMpfHR9/SU8vFxZUFOTftVSNPP8kOAROASdfojYo18Oe39veNOJcwig8gBT+WzPXQ=----ATTACHMENT:----NTk5OTcyNTA4NjM3NjI4MiA1MTI2ODg0NDUwNDY3MjQyIDgwMjY4Njg3MDk3NTI5NTY=