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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

PrototypeConfigurator.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 2.42 KiB


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\Loader\Configurator;
13   
14  use Symfony\Component\DependencyInjection\Definition;
15  use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
16   
17  /**
18   * @author Nicolas Grekas <p@tchwork.com>
19   */
20  class PrototypeConfigurator extends AbstractServiceConfigurator
21  {
22      const FACTORY = 'load';
23   
24      use Traits\AbstractTrait;
25      use Traits\ArgumentTrait;
26      use Traits\AutoconfigureTrait;
27      use Traits\AutowireTrait;
28      use Traits\BindTrait;
29      use Traits\CallTrait;
30      use Traits\ConfiguratorTrait;
31      use Traits\DeprecateTrait;
32      use Traits\FactoryTrait;
33      use Traits\LazyTrait;
34      use Traits\ParentTrait;
35      use Traits\PropertyTrait;
36      use Traits\PublicTrait;
37      use Traits\ShareTrait;
38      use Traits\TagTrait;
39   
40      private $loader;
41      private $resource;
42      private $exclude;
43      private $allowParent;
44   
45      public function __construct(ServicesConfigurator $parent, PhpFileLoader $loader, Definition $defaults, $namespace, $resource, $allowParent)
46      {
47          $definition = new Definition();
48          if (!$defaults->isPublic() || !$defaults->isPrivate()) {
49              $definition->setPublic($defaults->isPublic());
50          }
51          $definition->setAutowired($defaults->isAutowired());
52          $definition->setAutoconfigured($defaults->isAutoconfigured());
53          // deep clone, to avoid multiple process of the same instance in the passes
54          $definition->setBindings(unserialize(serialize($defaults->getBindings())));
55          $definition->setChanges([]);
56   
57          $this->loader = $loader;
58          $this->resource = $resource;
59          $this->allowParent = $allowParent;
60   
61          parent::__construct($parent, $definition, $namespace, $defaults->getTags());
62      }
63   
64      public function __destruct()
65      {
66          parent::__destruct();
67   
68          if ($this->loader) {
69              $this->loader->registerClasses($this->definition, $this->id, $this->resource, $this->exclude);
70          }
71          $this->loader = null;
72      }
73   
74      /**
75       * Excludes files from registration using a glob pattern.
76       *
77       * @param string $exclude
78       *
79       * @return $this
80       */
81      final public function exclude($exclude)
82      {
83          $this->exclude = $exclude;
84   
85          return $this;
86      }
87  }
88