Version 1
[yaffs-website] / vendor / drush / drush / lib / Drush / Drupal / DrushServiceModfier.php
1 <?php
2
3 namespace Drush\Drupal;
4
5 use Drush\Log\LogLevel;
6 use Drupal\Core\DependencyInjection\ServiceModifierInterface;
7 use Drupal\Core\DependencyInjection\ContainerBuilder;
8
9 class DrushServiceModfier implements ServiceModifierInterface
10 {
11     /**
12      * @inheritdoc
13      */
14     public function alter(ContainerBuilder $container) {
15         drush_log(dt("service modifier alter"), LogLevel::DEBUG);
16         // http://symfony.com/doc/2.7/components/dependency_injection/tags.html#register-the-pass-with-the-container
17         $container->register('drush.service.consolecommands', 'Drush\Command\ServiceCommandlist');
18         $container->addCompilerPass(new FindCommandsCompilerPass('drush.service.consolecommands', 'drush.command'));
19         $container->register('drush.service.consolidationcommands', 'Drush\Command\ServiceCommandlist');
20         $container->addCompilerPass(new FindCommandsCompilerPass('drush.service.consolidationcommands', 'consolidation.commandhandler'));
21     }
22 }