AnalyzeServiceReferencesPass
extends AbstractRecursivePass
in package
Run this pass before passes that need to know more about the relation of your services.
This class will populate the ServiceReferenceGraph with information. You can retrieve the graph in other passes from the compiler.
Tags
Table of Contents
Properties
- $container : ContainerBuilder
- $currentId : mixed
- $aliases : array<string|int, mixed>
- $byConstructor : bool
- $byFactory : bool
- $currentDefinition : mixed
- $definitions : array<string|int, mixed>
- $expressionLanguage : mixed
- $graph : mixed
- $hasProxyDumper : bool
- $inExpression : bool
- $lazy : bool
- $onlyConstructorArguments : bool
- $processExpressions : bool
Methods
- __construct() : mixed
- process() : mixed
- Processes a ContainerBuilder object to populate the service reference graph.
- enableExpressionProcessing() : mixed
- getConstructor() : ReflectionFunctionAbstract|null
- getReflectionMethod() : ReflectionFunctionAbstract
- inExpression() : bool
- processValue() : mixed
- Processes a value found in a definition tree.
- getDefinitionId() : string|null
- getExpressionLanguage() : ExpressionLanguage
Properties
$container
protected
ContainerBuilder
$container
$currentId
protected
mixed
$currentId
$aliases
private
array<string|int, mixed>
$aliases
$byConstructor
private
bool
$byConstructor
$byFactory
private
bool
$byFactory
$currentDefinition
private
mixed
$currentDefinition
= null
$definitions
private
array<string|int, mixed>
$definitions
$expressionLanguage
private
mixed
$expressionLanguage
$graph
private
mixed
$graph
$hasProxyDumper
private
bool
$hasProxyDumper
$inExpression
private
bool
$inExpression
= false
$lazy
private
bool
$lazy
$onlyConstructorArguments
private
bool
$onlyConstructorArguments
$processExpressions
private
bool
$processExpressions
= false
Methods
__construct()
public
__construct([bool $onlyConstructorArguments = false ][, bool $hasProxyDumper = true ]) : mixed
Parameters
- $onlyConstructorArguments : bool = false
-
Sets this Service Reference pass to ignore method calls
- $hasProxyDumper : bool = true
process()
Processes a ContainerBuilder object to populate the service reference graph.
public
process(ContainerBuilder $container) : mixed
Parameters
- $container : ContainerBuilder
enableExpressionProcessing()
protected
enableExpressionProcessing() : mixed
getConstructor()
protected
getConstructor(Definition $definition, bool $required) : ReflectionFunctionAbstract|null
Parameters
- $definition : Definition
- $required : bool
Tags
Return values
ReflectionFunctionAbstract|nullgetReflectionMethod()
protected
getReflectionMethod(Definition $definition, string $method) : ReflectionFunctionAbstract
Parameters
- $definition : Definition
- $method : string
Tags
Return values
ReflectionFunctionAbstractinExpression()
protected
inExpression([bool $reset = true ]) : bool
Parameters
- $reset : bool = true
Return values
boolprocessValue()
Processes a value found in a definition tree.
protected
processValue(mixed $value[, bool $isRoot = false ]) : mixed
Parameters
- $value : mixed
- $isRoot : bool = false
getDefinitionId()
private
getDefinitionId(string $id) : string|null
Parameters
- $id : string
Return values
string|nullgetExpressionLanguage()
private
getExpressionLanguage() : ExpressionLanguage