-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSeiffertConsoleExtraBundle.php
More file actions
35 lines (29 loc) · 962 Bytes
/
SeiffertConsoleExtraBundle.php
File metadata and controls
35 lines (29 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Seiffert\ConsoleExtraBundle;
use Seiffert\ConsoleExtraBundle\DependencyInjection\CompilerPass\CommandCompilerPass;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Paul Seiffert <paul.seiffert@gmail.com>
*/
class SeiffertConsoleExtraBundle extends Bundle
{
/**
* @param Application $application
*/
public function registerCommands(Application $application)
{
parent::registerCommands($application);
$commandRegistry = $this->container->get('seiffert_console_extra.command_registry');
$application->addCommands($commandRegistry->getCommands());
}
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new CommandCompilerPass());
}
}