DependencyInjection/EkoGoogleTranslateExtension.php
protected function loadProfilerCollector(ContainerBuilder $container, XmlFileLoader $loader)
    {
        if ($container->getParameter('kernel.debug')) {
            $loader->load('collector.xml');

            $services = $container->findTaggedServiceIds('eko.google_translate.method');
            $identifiers = array_keys($services);

            foreach ($identifiers as $identifier) {
                $serviceDefinition = $container->getDefinition($identifier);
                $serviceDefinition->addArgument(new Reference('debug.stopwatch'));

                $container->setDefinition($identifier, $serviceDefinition);
            }
        }
    }
protected function loadProfilerCollector(ContainerBuilder $container, XmlFileLoader $loader)
    {
        if ($container->getParameter('kernel.debug')) {
            $loader->load('collector.xml');

            $services = $container->findTaggedServiceIds('eko.google_translate.method');
            $identifiers = array_keys($services);

            foreach ($identifiers as $identifier) {
                $serviceDefinition = $container->getDefinition($identifier);
                $serviceDefinition->addArgument(new Reference('debug.stopwatch'));

                $container->setDefinition($identifier, $serviceDefinition);
            }
        }
    }
protected function loadProfilerCollector ( ContainerBuilder $ container , XmlFileLoader $ loader ) { if ( $ container -> getParameter ( 'kernel.debug' ) ) { $ loader -> load ( 'collector.xml' ) ; $ services = $ container -> findTaggedServiceIds ( 'eko.google_translate.method' ) ; $ identifiers = array_keys ( $ services ) ; foreach ( $ identifiers as $ identifier ) { $ serviceDefinition = $ container -> getDefinition ( $ identifier ) ; $ serviceDefinition -> addArgument ( new Reference ( 'debug.stopwatch' ) ) ; $ container -> setDefinition ( $ identifier , $ serviceDefinition ) ; } } }
Loads profiler collector for correct environments.

@param ContainerBuilder $container Symfony dependency injection container
@param XmlFileLoader    $loader    XML file loader
Loads profiler collector for correct environments .