for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Mediapart LaPresseLibre Bundle.
*
* CC BY-NC-SA <https://github.com/mediapart/lapresselibre-bundle>
* For the full license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mediapart\Bundle\LaPresseLibreBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Reference;
* This is the class that load you tagged services to be used by endpoint
class OperationCompilerPass implements CompilerPassInterface
{
* {@inheritDoc}
public function process(ContainerBuilder $container)
$definition = $container->getDefinition('mediapart_lapresselibre.endpoint_factory');
$taggedServices = $container->findTaggedServiceIds('lapresselibre');
foreach ($taggedServices as $id => $tags) {
foreach ($tags as $attributes) {
$definition->addMethodCall(
'register',
array(new Reference($id), $attributes)
);
}