Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Bootstrap / DrupalServiceModifier.php
1 <?php
2
3 namespace Drupal\Console\Bootstrap;
4
5 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
6 use Drupal\Core\DependencyInjection\ContainerBuilder;
7
8 /**
9  * Class DrupalServiceModifier
10  *
11  * @package Drupal\Console\Bootstrap
12  */
13 class DrupalServiceModifier implements ServiceModifierInterface
14 {
15     /**
16      * @var string
17      */
18     protected $root;
19
20     /**
21      * @var string
22      */
23     protected $commandTag;
24
25     /**
26      * @var string
27      */
28     protected $generatorTag;
29
30     /**
31      * DrupalServiceModifier constructor.
32      *
33      * @param string $root
34      * @param string $serviceTag
35      * @param string $generatorTag
36      */
37     public function __construct(
38         $root = null,
39         $serviceTag,
40         $generatorTag
41     ) {
42         $this->root = $root;
43         $this->commandTag = $serviceTag;
44         $this->generatorTag = $generatorTag;
45     }
46
47     /**
48      * @inheritdoc
49      */
50     public function alter(ContainerBuilder $container)
51     {
52         $container->addCompilerPass(
53             new DrupalCompilerPass()
54         );
55
56         //        $container->addCompilerPass(
57         //            new FindCommandsCompilerPass($this->commandTag)
58         //        );
59         //
60         //        $container->addCompilerPass(
61         //            new FindGeneratorsCompilerPass($this->generatorTag)
62         //        );
63     }
64 }