MethodTargetExpressionParser
class MethodTargetExpressionParser extends PointcutExpressionParser (View source)
A specialized pointcut expression parser tailored to policy expressions
Constants
PATTERN_SPLITBYOPERATOR |
|
PATTERN_MATCHPOINTCUTDESIGNATOR |
|
PATTERN_MATCHVISIBILITYMODIFIER |
|
PATTERN_MATCHRUNTIMEEVALUATIONSDEFINITION |
|
PATTERN_MATCHRUNTIMEEVALUATIONSVALUELIST |
|
PATTERN_MATCHMETHODNAMEANDARGUMENTS |
|
Properties
protected ProxyClassBuilder | $proxyClassBuilder | from PointcutExpressionParser | |
protected ReflectionService | $reflectionService | from PointcutExpressionParser | |
protected ObjectManagerInterface | $objectManager | from PointcutExpressionParser | |
protected string | $sourceHint | from PointcutExpressionParser |
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
Throws an exception, as recursive privilege targets are not allowed.
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, array $trace = [])
Throws an exception, as recursive privilege targets are not allowed.
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