PointcutExpressionParser
class PointcutExpressionParser (View source)
The pointcut expression parser parses the definition of the place and circumstances where advices can be inserted later on. The input of the parse() function is a string from a pointcut- or advice annotation and returns a pointcut filter composite.
Constants
PATTERN_SPLITBYOPERATOR |
|
PATTERN_MATCHPOINTCUTDESIGNATOR |
|
PATTERN_MATCHVISIBILITYMODIFIER |
|
PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION |
|
PATTERN_MATCHRUNTIMEEVALUATIONSVALUELIST |
|
PATTERN_MATCHMETHODNAMEANDARGUMENTS |
|
Properties
protected ProxyClassBuilder | $proxyClassBuilder | ||
protected ReflectionService | $reflectionService | ||
protected ObjectManagerInterface | $objectManager | ||
protected string | $sourceHint |
Methods
Parses a string pointcut expression and returns the pointcut objects accordingly
Takes a class annotation filter pattern and adds a so configured class annotation filter to the filter composite object.
Takes a class filter pattern and adds a so configured class filter to the filter composite object.
Takes a method annotation filter pattern and adds a so configured method annotation filter to the filter composite object.
Parse an annotation pattern and adjust $annotationPattern and $annotationPropertyConstraints as needed.
Splits the parameters of the pointcut designator "method" into a class and a method part and adds the appropriately configured filters to the filter composite object.
Adds a class type filter to the pointcut filter composite
Splits the value of the pointcut designator "pointcut" into an aspect class- and a pointcut method part and adds the appropriately configured filter to the composite object.
Adds a custom filter to the pointcut filter composite
Adds a setting filter to the pointcut filter composite
Adds runtime evaluations to the pointcut filter composite
Returns the substring of $string which is enclosed by parentheses of the first level.
Parses the signature pattern and returns the visibility modifier if any. If a modifier was found, it will be removed from the $signaturePattern.
Parses the method arguments pattern and returns the corresponding constraints array
Parses the evaluate string for runtime evaluations and returns the corresponding conditions array
Details
void
injectProxyClassBuilder(ProxyClassBuilder $proxyClassBuilder)
No description
void
injectReflectionService(ReflectionService $reflectionService)
No description
void
injectObjectManager(ObjectManagerInterface $objectManager)
No description
PointcutFilterComposite
parse(string $pointcutExpression, string $sourceHint)
Parses a string pointcut expression and returns the pointcut objects accordingly
protected void
parseDesignatorClassAnnotatedWith(string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite)
Takes a class annotation filter pattern and adds a so configured class annotation filter to the filter composite object.
protected void
parseDesignatorClass(string $operator, string $classPattern, PointcutFilterComposite $pointcutFilterComposite)
Takes a class filter pattern and adds a so configured class filter to the filter composite object.
protected void
parseDesignatorMethodAnnotatedWith(string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite)
Takes a method annotation filter pattern and adds a so configured method annotation filter to the filter composite object.
protected void
parseAnnotationPattern(string $annotationPattern, array $annotationPropertyConstraints)
Parse an annotation pattern and adjust $annotationPattern and $annotationPropertyConstraints as needed.
protected void
parseDesignatorMethod(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite)
Splits the parameters of the pointcut designator "method" into a class and a method part and adds the appropriately configured filters to the filter composite object.
protected void
parseDesignatorWithin(string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite)
Adds a class type filter to the pointcut filter composite
protected void
parseDesignatorPointcut(string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite)
Splits the value of the pointcut designator "pointcut" into an aspect class- and a pointcut method part and adds the appropriately configured filter to the composite object.
protected void
parseDesignatorFilter(string $operator, string $filterObjectName, PointcutFilterComposite $pointcutFilterComposite)
Adds a custom filter to the pointcut filter composite
protected void
parseDesignatorSetting(string $operator, string $configurationPath, PointcutFilterComposite $pointcutFilterComposite)
Adds a setting filter to the pointcut filter composite
protected void
parseRuntimeEvaluations(string $operator, string $runtimeEvaluations, PointcutFilterComposite $pointcutFilterComposite)
Adds runtime evaluations to the pointcut filter composite
protected string
getSubstringBetweenParentheses(string $string)
Returns the substring of $string which is enclosed by parentheses of the first level.
protected string|null
getVisibilityFromSignaturePattern(string $signaturePattern)
Parses the signature pattern and returns the visibility modifier if any. If a modifier was found, it will be removed from the $signaturePattern.
protected array
getArgumentConstraintsFromMethodArgumentsPattern(string $methodArgumentsPattern)
Parses the method arguments pattern and returns the corresponding constraints array
protected array
getRuntimeEvaluationConditionsFromEvaluateString(string $evaluateString)
Parses the evaluate string for runtime evaluations and returns the corresponding conditions array