for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is a part of Sculpin.
*
* (c) Dragonfly Development Inc.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symplify\PHP7_Sculpin\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
final class DataProviderManagerPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
public function process(ContainerBuilder $container)
$definition = $container->getDefinition('sculpin.data_provider_manager');
foreach ($container->findTaggedServiceIds('sculpin.data_provider') as $id => $tagAttributes) {
foreach ($tagAttributes as $attributes) {
$definition->addMethodCall('registerDataProvider', [$attributes['alias'], new Reference($id)]);
}