W3cubDocs

/Symfony 4.1

Compiler

class Compiler

This class is used to remove circular dependencies between individual passes.

Methods

__construct()
PassConfig getPassConfig()

Returns the PassConfig.

ServiceReferenceGraph getServiceReferenceGraph()

Returns the ServiceReferenceGraph.

addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)

Adds a pass to the PassConfig.

log(CompilerPassInterface $pass, string $message)
array getLog()

Returns the log.

compile(ContainerBuilder $container)

Run the Compiler and process all Passes.

Details

__construct()

PassConfig getPassConfig()

Returns the PassConfig.

Return Value

PassConfig The PassConfig instance

ServiceReferenceGraph getServiceReferenceGraph()

Returns the ServiceReferenceGraph.

Return Value

ServiceReferenceGraph The ServiceReferenceGraph instance

addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)

Adds a pass to the PassConfig.

Parameters

CompilerPassInterface $pass A compiler pass
string $type The type of the pass
int $priority Used to sort the passes

log(CompilerPassInterface $pass, string $message)

Parameters

CompilerPassInterface $pass
string $message

array getLog()

Returns the log.

Return Value

array Log array

compile(ContainerBuilder $container)

Run the Compiler and process all Passes.

Parameters

ContainerBuilder $container

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/DependencyInjection/Compiler/Compiler.html