PHP Class GrumPHP\Configuration\Compiler\PhpParserCompilerPass

Inheritance: implements Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Show file Open project: phpro/grumphp

Public Methods

Method Description
markServiceAsPrototype ( Definition $definition ) This method can be used to make the service shared cross-version.
process ( ContainerBuilder $container ) Sets the visitors as non shared services.

Method Details

markServiceAsPrototype() public method

From Symfony 2.8 the setShared method was available. The 2.7 version is the LTS, so we still need to support it.
public markServiceAsPrototype ( Definition $definition )
$definition Symfony\Component\DependencyInjection\Definition

process() public method

This will make sure that the state of the visitor won't need to be reset after an iteration of the traverser. All visitor Ids are registered in the traverser configurator. The configurator will be used to apply the configured visitors to the traverser.
public process ( ContainerBuilder $container )
$container Symfony\Component\DependencyInjection\ContainerBuilder