for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the BenGorFile package.
*
* (c) Beñat Espiña <[email protected]>
* (c) Gorka Laucirica <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BenGorFile\FileBundle\DependencyInjection\Compiler;
use BenGorFile\FileBundle\DependencyInjection\Compiler\Application\DataTransformer\FileDTODataTransformerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Register application data transformers compiler pass.
* Data transformer declaration via PHP allows more
* flexibility with customization extend files.
* @author Beñat Espiña <[email protected]>
class ApplicationDataTransformersPass implements CompilerPassInterface
{
* {@inheritdoc}
public function process(ContainerBuilder $container)
$config = $container->getParameter('bengor_file.config');
foreach ($config['file_class'] as $key => $file) {
(new FileDTODataTransformerBuilder(
$container, $file['data_transformer']
))->build($key);
}