forked from liip/LiipImagineBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLiipImagineBundle.php
32 lines (25 loc) · 1.07 KB
/
LiipImagineBundle.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
<?php
namespace Liip\ImagineBundle;
use Liip\ImagineBundle\DependencyInjection\Compiler\LoadersCompilerPass;
use Liip\ImagineBundle\DependencyInjection\Factory\Loader\StreamLoaderFactory;
use Liip\ImagineBundle\DependencyInjection\Factory\Resolver\AwsS3ResolverFactory;
use Liip\ImagineBundle\DependencyInjection\Factory\Resolver\WebPathResolverFactory;
use Liip\ImagineBundle\DependencyInjection\LiipImagineExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class LiipImagineBundle extends Bundle
{
/**
* {@inheritDoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new LoadersCompilerPass());
/** @var $extension LiipImagineExtension */
$extension = $container->getExtension('liip_imagine');
$extension->addResolverFactory(new WebPathResolverFactory);
$extension->addResolverFactory(new AwsS3ResolverFactory);
$extension->addLoaderFactory(new StreamLoaderFactory);
}
}