forked from php-flasher/flasher-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FlasherSymfonyBundle.php
57 lines (50 loc) · 1.58 KB
/
FlasherSymfonyBundle.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <[email protected]>
*/
namespace Flasher\Symfony;
use Flasher\Prime\Container\FlasherContainer;
use Flasher\Prime\Plugin\FlasherPlugin;
use Flasher\Symfony\Container\SymfonyContainer;
use Flasher\Symfony\DependencyInjection\Compiler\EventSubscriberCompilerPass;
use Flasher\Symfony\DependencyInjection\Compiler\FactoryCompilerPass;
use Flasher\Symfony\DependencyInjection\Compiler\FlasherAwareCompilerPass;
use Flasher\Symfony\DependencyInjection\Compiler\PresenterCompilerPass;
use Flasher\Symfony\DependencyInjection\FlasherExtension;
use Flasher\Symfony\Support\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class FlasherSymfonyBundle extends Bundle // Symfony\Component\HttpKernel\Bundle\Bundle
{
/**
* {@inheritdoc}
*/
public function boot()
{
FlasherContainer::init(new SymfonyContainer($this->container));
}
/**
* {@inheritDoc}
*/
public function createPlugin()
{
return new FlasherPlugin();
}
/**
* {@inheritdoc}
*/
protected function flasherBuild(ContainerBuilder $container)
{
$container->addCompilerPass(new FactoryCompilerPass());
$container->addCompilerPass(new EventSubscriberCompilerPass());
$container->addCompilerPass(new PresenterCompilerPass());
$container->addCompilerPass(new FlasherAwareCompilerPass());
}
/**
* {@inheritdoc}
*/
protected function getFlasherContainerExtension()
{
return new FlasherExtension();
}
}