DependencyInjection/Compiler/FiltersCompilerPass.php 1 location
|
@@ 9-26 (lines=18) @@
|
| 6 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 7 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 8 |
|
|
| 9 |
|
class FiltersCompilerPass implements CompilerPassInterface |
| 10 |
|
{ |
| 11 |
|
/** |
| 12 |
|
* {@inheritdoc} |
| 13 |
|
*/ |
| 14 |
|
public function process(ContainerBuilder $container) |
| 15 |
|
{ |
| 16 |
|
$tags = $container->findTaggedServiceIds('liip_imagine.filter.loader'); |
| 17 |
|
|
| 18 |
|
if (count($tags) > 0 && $container->hasDefinition('liip_imagine.filter.manager')) { |
| 19 |
|
$manager = $container->getDefinition('liip_imagine.filter.manager'); |
| 20 |
|
|
| 21 |
|
foreach ($tags as $id => $tag) { |
| 22 |
|
$manager->addMethodCall('addLoader', array($tag[0]['loader'], new Reference($id))); |
| 23 |
|
} |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
DependencyInjection/Compiler/LoadersCompilerPass.php 1 location
|
@@ 9-26 (lines=18) @@
|
| 6 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 7 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 8 |
|
|
| 9 |
|
class LoadersCompilerPass implements CompilerPassInterface |
| 10 |
|
{ |
| 11 |
|
/** |
| 12 |
|
* {@inheritdoc} |
| 13 |
|
*/ |
| 14 |
|
public function process(ContainerBuilder $container) |
| 15 |
|
{ |
| 16 |
|
$tags = $container->findTaggedServiceIds('liip_imagine.binary.loader'); |
| 17 |
|
|
| 18 |
|
if (count($tags) > 0 && $container->hasDefinition('liip_imagine.data.manager')) { |
| 19 |
|
$manager = $container->getDefinition('liip_imagine.data.manager'); |
| 20 |
|
|
| 21 |
|
foreach ($tags as $id => $tag) { |
| 22 |
|
$manager->addMethodCall('addLoader', array($tag[0]['loader'], new Reference($id))); |
| 23 |
|
} |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
DependencyInjection/Compiler/PostProcessorsCompilerPass.php 1 location
|
@@ 14-31 (lines=18) @@
|
| 11 |
|
* |
| 12 |
|
* @author Konstantin Tjuterev <[email protected]> |
| 13 |
|
*/ |
| 14 |
|
class PostProcessorsCompilerPass implements CompilerPassInterface |
| 15 |
|
{ |
| 16 |
|
/** |
| 17 |
|
* {@inheritdoc} |
| 18 |
|
*/ |
| 19 |
|
public function process(ContainerBuilder $container) |
| 20 |
|
{ |
| 21 |
|
$tags = $container->findTaggedServiceIds('liip_imagine.filter.post_processor'); |
| 22 |
|
|
| 23 |
|
if (count($tags) > 0 && $container->hasDefinition('liip_imagine.filter.manager')) { |
| 24 |
|
$manager = $container->getDefinition('liip_imagine.filter.manager'); |
| 25 |
|
|
| 26 |
|
foreach ($tags as $id => $tag) { |
| 27 |
|
$manager->addMethodCall('addPostProcessor', array($tag[0]['post_processor'], new Reference($id))); |
| 28 |
|
} |
| 29 |
|
} |
| 30 |
|
} |
| 31 |
|
} |
| 32 |
|
|
DependencyInjection/Compiler/ResolversCompilerPass.php 1 location
|
@@ 9-26 (lines=18) @@
|
| 6 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 7 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 8 |
|
|
| 9 |
|
class ResolversCompilerPass implements CompilerPassInterface |
| 10 |
|
{ |
| 11 |
|
/** |
| 12 |
|
* {@inheritdoc} |
| 13 |
|
*/ |
| 14 |
|
public function process(ContainerBuilder $container) |
| 15 |
|
{ |
| 16 |
|
$tags = $container->findTaggedServiceIds('liip_imagine.cache.resolver'); |
| 17 |
|
|
| 18 |
|
if (count($tags) > 0 && $container->hasDefinition('liip_imagine.cache.manager')) { |
| 19 |
|
$manager = $container->getDefinition('liip_imagine.cache.manager'); |
| 20 |
|
|
| 21 |
|
foreach ($tags as $id => $tag) { |
| 22 |
|
$manager->addMethodCall('addResolver', array($tag[0]['resolver'], new Reference($id))); |
| 23 |
|
} |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|