Symfony2 API
Class

Symfony\Component\DependencyInjection\Compiler\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()

Constructor.

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.

array getMergePass()

Gets all passes for the Merge pass.

setMergePass(CompilerPassInterface $pass)

Sets the Merge 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

at line 43
public __construct()

Constructor.

at line 83
public array getPasses()

Returns all passes in order to be processed.

Return Value

array An array of all passes to process

at line 105
public 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

at line 123
public array getAfterRemovingPasses()

Gets all passes for the AfterRemoving pass.

Return Value

array An array of passes

at line 135
public array getBeforeOptimizationPasses()

Gets all passes for the BeforeOptimization pass.

Return Value

array An array of passes

at line 147
public array getBeforeRemovingPasses()

Gets all passes for the BeforeRemoving pass.

Return Value

array An array of passes

at line 159
public array getOptimizationPasses()

Gets all passes for the Optimization pass.

Return Value

array An array of passes

at line 171
public array getRemovingPasses()

Gets all passes for the Removing pass.

Return Value

array An array of passes

at line 183
public array getMergePass()

Gets all passes for the Merge pass.

Return Value

array An array of passes

at line 195
public setMergePass(CompilerPassInterface $pass)

Sets the Merge Pass.

Parameters

CompilerPassInterface $pass The merge pass

at line 207
public setAfterRemovingPasses(array $passes)

Sets the AfterRemoving passes.

Parameters

array $passes An array of passes

at line 219
public setBeforeOptimizationPasses(array $passes)

Sets the BeforeOptimization passes.

Parameters

array $passes An array of passes

at line 231
public setBeforeRemovingPasses(array $passes)

Sets the BeforeRemoving passes.

Parameters

array $passes An array of passes

at line 243
public setOptimizationPasses(array $passes)

Sets the Optimization passes.

Parameters

array $passes An array of passes

at line 255
public setRemovingPasses(array $passes)

Sets the Removing passes.

Parameters

array $passes An array of passes