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
- $skipScalars : bool
- $aliases : array<string|int, mixed>
- $byConstructor : bool
- $byFactory : bool
- $byMultiUseArgument : bool
- $currentDefinition : Definition|null
- $definitions : array<string|int, mixed>
- $graph : ServiceReferenceGraph
- $hasProxyDumper : bool
- $lazy : bool
- $onlyConstructorArguments : bool
Methods
- __construct() : mixed
- process() : void
- Processes a ContainerBuilder object to populate the service reference graph.
- enableExpressionProcessing() : void
- getConstructor() : ReflectionFunctionAbstract|null
- getReflectionMethod() : ReflectionFunctionAbstract
- inExpression() : bool
- processValue() : mixed
- Processes a value found in a definition tree.
- getDefinitionId() : string|null
Properties
$container
protected
ContainerBuilder
$container
$currentId
protected
mixed
$currentId
$skipScalars
protected
bool
$skipScalars
= true
$aliases
private
array<string|int, mixed>
$aliases
$byConstructor
private
bool
$byConstructor
$byFactory
private
bool
$byFactory
$byMultiUseArgument
private
bool
$byMultiUseArgument
$currentDefinition
private
Definition|null
$currentDefinition
= null
$definitions
private
array<string|int, mixed>
$definitions
$graph
private
ServiceReferenceGraph
$graph
$hasProxyDumper
private
bool
$hasProxyDumper
$lazy
private
bool
$lazy
$onlyConstructorArguments
private
bool
$onlyConstructorArguments
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) : void
Parameters
- $container : ContainerBuilder
enableExpressionProcessing()
protected
enableExpressionProcessing() : void
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