* * 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 Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Reference; /** * Checks that all references are pointing to a valid service. * * @author Johannes M. Schmitt */ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass { protected function processValue($value, $isRoot = false) { if (!$value instanceof Reference) { return parent::processValue($value, $isRoot); } if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() && !$this->container->has($id = (string) $value)) { throw new ServiceNotFoundException($id, $this->currentId); } if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior() && $this->container->has($id = (string) $value) && !$this->container->findDefinition($id)->isShared()) { throw new InvalidArgumentException(sprintf('Invalid ignore-on-uninitialized reference found in service "%s": target service "%s" is not shared.', $this->currentId, $id)); } return $value; } } __halt_compiler();----SIGNATURE:----kV/gQKVmN0LiglZ5uSnG95U3QwcBJYuQEEmgNhZ1hWjQNsAmG1BHiCHv3OdwLRCyoVjxH/+vSQamEbItEXcB2Huzqa4e5Dw5GJXki7zkECIoSdqm/xfn711P6LE+NTZRM5ruxbSiTnJzNjnV7X+ZT4K4kMLqiR6g4QYVxjNDQf9kd19hztFlx5YNDQztpACJtH/ZegAChjxP+/87aemzMcxyc95Y77MmeExRMfJAJv89qyEtFxL+d+cBOl0t0J7BguG9R7eAsMkzPjY6im/+9CPoho3fFgvu4S8bQvPNpVf4rvYG8KJUa4h1Qw4KLH5BtvlgFVe3Vr/99HBOa9m5sxsZ0wOL7QzjNkUR8VQLoQWmCAoox9PTOQ98YJIpQOAbVGtrYhOHR1j8TGTMIYV2/E1wHl2FO8CoRESxIs3cTB1Ejh9m2hvtmvIlg/gbWhxCxjtutNay3OC78p20c7TUxtyr0g4xv/lwhBmQ7wx5i90E+LhKxId2Cjs8ehUwFXV9NW5J/rlwjiucusIQ0+mXCUH/BhQTI9voYaF7ltfYwurhDb3R5WThcygamRriAYou9L9RfFp84iPSLBY5jgoE58OdrsxBWzHNkgk8Zs2QyvY6gzZTf1boyeJYaWIn7pUeexHajRygnypJ2wFR3ui+CitAQlPkF5IvfVeF2mQSYEA=----ATTACHMENT:----NDExODY4NDAzMjAzMzc5OCA1MDc5NzAyNzQ5MTMyMzg1IDg0MTE0NDM4ODY0MzA2MTU=