[ Index ]

PHP Cross Reference of phpBB-3.3.3-deutsch

title

Body

[close]

/vendor/symfony/dependency-injection/Loader/Configurator/ -> ServiceConfigurator.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <fabien@symfony.com>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Symfony\Component\DependencyInjection\Loader\Configurator;
  13  
  14  use Symfony\Component\DependencyInjection\ChildDefinition;
  15  use Symfony\Component\DependencyInjection\ContainerBuilder;
  16  use Symfony\Component\DependencyInjection\Definition;
  17  
  18  /**
  19   * @author Nicolas Grekas <p@tchwork.com>
  20   */
  21  class ServiceConfigurator extends AbstractServiceConfigurator
  22  {
  23      const FACTORY = 'services';
  24  
  25      use Traits\AbstractTrait;
  26      use Traits\ArgumentTrait;
  27      use Traits\AutoconfigureTrait;
  28      use Traits\AutowireTrait;
  29      use Traits\BindTrait;
  30      use Traits\CallTrait;
  31      use Traits\ClassTrait;
  32      use Traits\ConfiguratorTrait;
  33      use Traits\DecorateTrait;
  34      use Traits\DeprecateTrait;
  35      use Traits\FactoryTrait;
  36      use Traits\FileTrait;
  37      use Traits\LazyTrait;
  38      use Traits\ParentTrait;
  39      use Traits\PropertyTrait;
  40      use Traits\PublicTrait;
  41      use Traits\ShareTrait;
  42      use Traits\SyntheticTrait;
  43      use Traits\TagTrait;
  44  
  45      private $container;
  46      private $instanceof;
  47      private $allowParent;
  48  
  49      public function __construct(ContainerBuilder $container, array $instanceof, $allowParent, ServicesConfigurator $parent, Definition $definition, $id, array $defaultTags)
  50      {
  51          $this->container = $container;
  52          $this->instanceof = $instanceof;
  53          $this->allowParent = $allowParent;
  54  
  55          parent::__construct($parent, $definition, $id, $defaultTags);
  56      }
  57  
  58      public function __destruct()
  59      {
  60          parent::__destruct();
  61  
  62          $this->container->removeBindings($this->id);
  63  
  64          if (!$this->definition instanceof ChildDefinition) {
  65              $this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
  66          } else {
  67              $this->container->setDefinition($this->id, $this->definition);
  68          }
  69      }
  70  }


Generated: Sun Feb 14 20:08:31 2021 Cross-referenced by PHPXref 0.7.1