-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathTheodoEvolutionLegacyWrapperBundle.php
40 lines (34 loc) · 1.19 KB
/
TheodoEvolutionLegacyWrapperBundle.php
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
36
37
38
39
40
<?php
namespace Theodo\Evolution\Bundle\LegacyWrapperBundle;
use Composer\Autoload\ClassLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Theodo\Evolution\Bundle\LegacyWrapperBundle\DependencyInjection\Compiler\KernelConfigurationPass;
use Theodo\Evolution\Bundle\LegacyWrapperBundle\DependencyInjection\Compiler\LoaderInjectorPass;
use Theodo\Evolution\Bundle\LegacyWrapperBundle\DependencyInjection\Compiler\ReplaceRouterPass;
class TheodoEvolutionLegacyWrapperBundle extends Bundle
{
/**
* @var \Composer\Autoload\ClassLoader
*/
private $loader;
/**
* @param ClassLoader $loader
*/
public function __construct(ClassLoader $loader = null)
{
$this->loader = $loader;
}
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
// The loader can be null when clearing the cache.
if (null !== $this->loader) {
$container->addCompilerPass(new LoaderInjectorPass($this->loader));
}
$container->addCompilerPass(new KernelConfigurationPass());
$container->addCompilerPass(new ReplaceRouterPass());
}
}