src/Behat/Behat/Gherkin/ServiceContainer/GherkinExtension.php
private function loadDefaultLoaders(ContainerBuilder $container, $cachePath)
    {
        $definition = new Definition('Behat\Gherkin\Loader\GherkinFileLoader', array(
            new Reference('gherkin.parser')
        ));

        if ($cachePath) {
            $cacheDefinition = new Definition('Behat\Gherkin\Cache\FileCache', array($cachePath));
        } else {
            $cacheDefinition = new Definition('Behat\Gherkin\Cache\MemoryCache');
        }

        $definition->addMethodCall('setCache', array($cacheDefinition));
        $definition->addMethodCall('setBasePath', array('%paths.base%'));
        $definition->addTag(self::LOADER_TAG, array('priority' => 50));
        $container->setDefinition('gherkin.loader.gherkin_file', $definition);
    }
private function loadDefaultLoaders(ContainerBuilder $container, $cachePath)
    {
        $definition = new Definition('Behat\Gherkin\Loader\GherkinFileLoader', array(
            new Reference('gherkin.parser')
        ));

        if ($cachePath) {
            $cacheDefinition = new Definition('Behat\Gherkin\Cache\FileCache', array($cachePath));
        } else {
            $cacheDefinition = new Definition('Behat\Gherkin\Cache\MemoryCache');
        }

        $definition->addMethodCall('setCache', array($cacheDefinition));
        $definition->addMethodCall('setBasePath', array('%paths.base%'));
        $definition->addTag(self::LOADER_TAG, array('priority' => 50));
        $container->setDefinition('gherkin.loader.gherkin_file', $definition);
    }
private function loadDefaultLoaders ( ContainerBuilder $ container , $ cachePath ) { $ definition = new Definition ( 'Behat\Gherkin\Loader\GherkinFileLoader' , array ( new Reference ( 'gherkin.parser' ) ) ) ; if ( $ cachePath ) { $ cacheDefinition = new Definition ( 'Behat\Gherkin\Cache\FileCache' , array ( $ cachePath ) ) ; } else { $ cacheDefinition = new Definition ( 'Behat\Gherkin\Cache\MemoryCache' ) ; } $ definition -> addMethodCall ( 'setCache' , array ( $ cacheDefinition ) ) ; $ definition -> addMethodCall ( 'setBasePath' , array ( '%paths.base%' ) ) ; $ definition -> addTag ( self :: LOADER_TAG , array ( 'priority' => 50 ) ) ; $ container -> setDefinition ( 'gherkin.loader.gherkin_file' , $ definition ) ; }
Loads gherkin loaders.

@param ContainerBuilder $container
@param string           $cachePath
Loads gherkin loaders .