class Compiler

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

Methods

__construct()

No description

getPassConfig()

Returns the PassConfig.

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)

No description

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