Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ResolveFactoryClassPass.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\DependencyInjection\Compiler;
13
14 use Symfony\Component\DependencyInjection\Definition;
15 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
16
17 /**
18 * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
19 */
20 class ResolveFactoryClassPass extends AbstractRecursivePass
21 {
22 /**
23 * {@inheritdoc}
24 */
25 protected function processValue($value, $isRoot = false)
26 {
27 if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) {
28 if (null === $class = $value->getClass()) {
29 throw new RuntimeException(sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId));
30 }
31
32 $factory[0] = $class;
33 $value->setFactory($factory);
34 }
35
36 return parent::processValue($value, $isRoot);
37 }
38 }
39