Symfony API
Class

Symfony\Component\DependencyInjection\Compiler\Compiler

class Compiler

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

Methods

__construct()

Constructor.

PassConfig getPassConfig()

Returns the PassConfig.

ServiceReferenceGraph getServiceReferenceGraph()

Returns the ServiceReferenceGraph.

LoggingFormatter getLoggingFormatter()

Returns the logging formatter which can be used by compilation passes.

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

Adds a pass to the PassConfig.

addLogMessage(string $string)

Adds a log message.

array getLog()

Returns the log.

compile(ContainerBuilder $container)

Run the Compiler and process all Passes.

Details

at line 31
public __construct()

Constructor.

at line 43
public PassConfig getPassConfig()

Returns the PassConfig.

Return Value

PassConfig The PassConfig instance

at line 53
public ServiceReferenceGraph getServiceReferenceGraph()

Returns the ServiceReferenceGraph.

Return Value

ServiceReferenceGraph The ServiceReferenceGraph instance

at line 63
public LoggingFormatter getLoggingFormatter()

Returns the logging formatter which can be used by compilation passes.

Return Value

LoggingFormatter

at line 74
public addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)

Adds a pass to the PassConfig.

Parameters

CompilerPassInterface $pass A compiler pass
string $type The type of the pass

at line 84
public addLogMessage(string $string)

Adds a log message.

Parameters

string $string The log message

at line 94
public array getLog()

Returns the log.

Return Value

array Log array

at line 104
public compile(ContainerBuilder $container)

Run the Compiler and process all Passes.

Parameters

ContainerBuilder $container