PassConfig

class PassConfig

Compiler Pass Configuration.

This class has a default configuration embedded.

Constants

TYPE_AFTER_REMOVING
TYPE_BEFORE_OPTIMIZATION
TYPE_BEFORE_REMOVING
TYPE_OPTIMIZE
TYPE_REMOVE

Methods

__construct()
array getPasses()

Returns all passes in order to be processed.

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

Adds a pass.

array getAfterRemovingPasses()

Gets all passes for the AfterRemoving pass.

array getBeforeOptimizationPasses()

Gets all passes for the BeforeOptimization pass.

array getBeforeRemovingPasses()

Gets all passes for the BeforeRemoving pass.

array getOptimizationPasses()

Gets all passes for the Optimization pass.

array getRemovingPasses()

Gets all passes for the Removing pass.

CompilerPassInterface getMergePass()

Gets the Merge pass.

setMergePass(CompilerPassInterface $pass)
setAfterRemovingPasses(array $passes)

Sets the AfterRemoving passes.

setBeforeOptimizationPasses(array $passes)

Sets the BeforeOptimization passes.

setBeforeRemovingPasses(array $passes)

Sets the BeforeRemoving passes.

setOptimizationPasses(array $passes)

Sets the Optimization passes.

setRemovingPasses(array $passes)

Sets the Removing passes.

Details

__construct()

array getPasses()

Returns all passes in order to be processed.

Return Value

array An array of all passes to process

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

Adds a pass.

Parameters

CompilerPassInterface $pass A Compiler pass
string $type The pass type

Exceptions

InvalidArgumentException when a pass type doesn't exist

array getAfterRemovingPasses()

Gets all passes for the AfterRemoving pass.

Return Value

array An array of passes

array getBeforeOptimizationPasses()

Gets all passes for the BeforeOptimization pass.

Return Value

array An array of passes

array getBeforeRemovingPasses()

Gets all passes for the BeforeRemoving pass.

Return Value

array An array of passes

array getOptimizationPasses()

Gets all passes for the Optimization pass.

Return Value

array An array of passes

array getRemovingPasses()

Gets all passes for the Removing pass.

Return Value

array An array of passes

CompilerPassInterface getMergePass()

Gets the Merge pass.

Return Value

CompilerPassInterface The merge pass

setMergePass(CompilerPassInterface $pass)

Parameters

CompilerPassInterface $pass

setAfterRemovingPasses(array $passes)

Sets the AfterRemoving passes.

Parameters

array $passes An array of passes

setBeforeOptimizationPasses(array $passes)

Sets the BeforeOptimization passes.

Parameters

array $passes An array of passes

setBeforeRemovingPasses(array $passes)

Sets the BeforeRemoving passes.

Parameters

array $passes An array of passes

setOptimizationPasses(array $passes)

Sets the Optimization passes.

Parameters

array $passes An array of passes

setRemovingPasses(array $passes)

Sets the Removing passes.

Parameters

array $passes An array of passes

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