* * 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:----Z2/CD0POCEFen2z1SyG03Ez+2F7/mOcD4d305sH0zBfbsg//z7uoxkifpARCDZgAH85mTX+OG9p7d8sEiEXm5ebJqNuM7+/Nsnmibcsr6FYwqxsjvjfpxl7bZFox8Be145y79N/nnxdKyfjDNuFYObljcQaeTYE4pVfxcTy0ez39Z40MBfKXpDUE1HC1oUu80THwOlULr4evNvU8VVbeYxGCiNGr5e4Px2n2Ga4hU9TtxsgNftIb7L1n+kB44sx418yaYb1CgR7Wx7WkqZc+QWawb5Ig8bfWWq720cz3S6fd47BtIYWv9ZsxZ5QgCM1i+D91GJxjJAYSpw/yI5ciFLztWGd/+JmCF+OpdrlxheclRmKsb4OALZasILSEG5zcuJhdrWMvHubbn2+pVJrrinBX5rLPRn2+L6pYQyJLEJXAfAh5VeVbNP9xEmgtVTL4LRNpiVnn7vhZPW0j65xFuzeoASS1jCEio/vZ6py4RkrNXGAisJceKRO9LI9lXLxB6TvVE700cREjnTbG2uLqqa0+rviBJGHv4eoJo2x5o0zoImL2M3gALOEBvUlRylqe5O1wTZXjL8rexRhU9dIg3bBzgpYDUTMktd7UvEbvYd6sEzoWPB1ALetTHAej430LBWO/hhk4TLyWj5q9J7NlMn6V2k0gMRK3o2yaKOd5L3M=----ATTACHMENT:----MjE3NjA2MDQ1Njk4NTc5NSA1NDExMzQxNzM3NzAyNjEwIDkxMTY2NDM2NTEzMDcxMDc=