* * 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:----TIdx+3b+hIlot01teD67WcAdyb3PJ09M+OoDP2pzbzjsHHF6srmCXWhcHRP+bEJ8WdFC84Dd5UpDfC+6FVHCfyXW2e+ZuOT9kmVJ89T7fntTeEIkjy9q1D6YpqSjLvIaPyD0VhcxNq5/QAkRu9XyN/gSywDNrkWZTml0Zp4HncUNwWBLpOSNb8QvfNS/vh9z0pdB9Xbd47/LALS//1RnpqWbwnckfabnq2WmOoEwTGD3hQC5hLEERB9IcAi3H0oOOaAvSMSnH4M7sJ8yGEQfZJ4WuPg8iTdt0hSbdyFL6r8dYSrnQ4pDnnzMmxeN8HT9PaNWFkcHC5xBm3Q/u//MKv+2fuEEEtucQGIlhlMAYCQnq+fKnOospLR7OlWMwJlcHDKupSgaWX/iLa5qPYMTQpYOQ9XZ3B6XEhm52p4DT8FbIX0g5agWSszx1owseX0h5iI/dsnPDDkpmlV7s0vyRj5uKtNKzuyK3GSK2BEPTPGf7NJlYF317ZBFIMdzoxPwD8ZJgk5loH41nBm4ivUZZS4dfkETwGE52LuzyG0UrU96ppbSugC0n7xrUS/g3BzfcL9LFIXBzK0mVBvrKeZMpQtql0H6m3QvpvMnQ3b+2qPY8tZSp6pERdxrh2vrqDhAJRL5FDrQUkl7YjEG3I0cbyGsYY39CFxDgr654cYr1eI=----ATTACHMENT:----OTcwMzEwNTM5ODM5ODY1MyA3NDk2NjU3OTgxNDkzMzA2IDg0MTgyODc2NDE3NDYzNTk=