* * 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\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** * Checks the validity of references. * * The following checks are performed by this pass: * - target definitions are not abstract * * @author Johannes M. Schmitt */ class CheckReferenceValidityPass extends AbstractRecursivePass { protected function processValue($value, $isRoot = false) { if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) { return $value; } if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) { $targetDefinition = $this->container->getDefinition((string) $value); if ($targetDefinition->isAbstract()) { throw new RuntimeException(sprintf( 'The definition "%s" has a reference to an abstract definition "%s". ' .'Abstract definitions cannot be the target of references.', $this->currentId, $value )); } } return parent::processValue($value, $isRoot); } } __halt_compiler();----SIGNATURE:----rZl34RhaRDwEXrocFdVASvHp8/0BKE/gJFtkCUqX6KhSzKGfYHIx+HfHkGSc/fzYHd4Cjiqb6Z5HFgq7HF4HQyQRdR+8SyzHYeNavv8unWjUz/dDPbltU5wBY+xg+L/5EGf2ZVqx6tMlgoJTTnhyevViKapPKcvpBCyD97s/Hgzc9W/kY/idjbxC4TZ3l+iWzngbKkKqMKb0Q995pXz2FcJJT1d88x+n+9lbyha5GMkpyUxg+32nO4j7PoRRf2k0AO50lJKA/mzBFGNp6omLUxUxgLVrnZLl1mGw1/9VxCq71C7A5Q0ZbZ3gI9vae/BX4oGn3DN26rA4R3fdzVauwNxSC86KC8G7X+YKF1yNf41VJx7rIZ03qEASiitIdHE6NH89ZcOqigXI5eiQ10bzXcV5h4ViA7lEOnZiI3IG1sBdxbcSsmJZL7HddJdaBpZYHOav5wh+1KyaPBxSdexc1pWX5QceOCylBignar8XitkvcMNqErYJtZeuC0Lpv1clZxM024dF/t/N9DIj1f+WZtSxw2aM9WT5DiawLaB2aUc8gsrRYm6P50sgg/nBZJjc4JW9ABnismR2HSy1RNlezDOL/CFb0g5yOHC3nWAI7DKdWgNqbh43UGx1RonYHIUS15uWGbd/x6HNkaEKzpVunwtugNuGlCUv0LTPGG9vblw=----ATTACHMENT:----NzEzNDU4NjE0NjAxODk2NyA3MDA5Nzg0MDUyNjMzMDk1IDg1NTExNDY3NjA2NzA4NjE=