Compiler

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.

LoggingFormatter getLoggingFormatter() deprecated

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

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

Adds a pass to the PassConfig.

addLogMessage(string $string) deprecated

Adds a log message.

log(CompilerPassInterface $pass, $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

LoggingFormatter getLoggingFormatter() deprecated

deprecated

since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead.

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

Return Value

LoggingFormatter

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

Adds a pass to the PassConfig.

Parameters

CompilerPassInterface $pass
$type

addLogMessage(string $string) deprecated

deprecated

since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead.

Adds a log message.

Parameters

string $string The log message

log(CompilerPassInterface $pass, $message)

Parameters

CompilerPassInterface $pass
$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.
http://api.symfony.com/3.3/Symfony/Component/DependencyInjection/Compiler/Compiler.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部