PHP Class Neos\Flow\Aop\Pointcut\PointcutExpressionParser

Exibir arquivo Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$proxyClassBuilder Neos\Flow\Aop\Builder\ProxyClassBuilder
$reflectionService Neos\Flow\Reflection\ReflectionService
$sourceHint string

Public Methods

Method Description
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
injectProxyClassBuilder ( ProxyClassBuilder $proxyClassBuilder ) : void
injectReflectionService ( ReflectionService $reflectionService ) : void
parse ( string $pointcutExpression, string $sourceHint ) : PointcutFilterComposite Parses a string pointcut expression and returns the pointcut objects accordingly

Protected Methods

Method Description
getArgumentConstraintsFromMethodArgumentsPattern ( string $methodArgumentsPattern ) : array Parses the method arguments pattern and returns the corresponding constraints array
getRuntimeEvaluationConditionsFromEvaluateString ( string $evaluateString ) : array Parses the evaluate string for runtime evaluations and returns the corresponding conditions array
getSubstringBetweenParentheses ( string $string ) : string Returns the substring of $string which is enclosed by parentheses of the first level.
getVisibilityFromSignaturePattern ( &$signaturePattern ) : string Parses the signature pattern and returns the visibility modifier if any. If a modifier was found, it will be removed from the $signaturePattern.
parseAnnotationPattern ( string &$annotationPattern, array &$annotationPropertyConstraints ) : void Parse an annotation pattern and adjust $annotationPattern and $annotationPropertyConstraints as needed.
parseDesignatorClass ( string $operator, string $classPattern, PointcutFilterComposite $pointcutFilterComposite ) : void Takes a class filter pattern and adds a so configured class filter to the filter composite object.
parseDesignatorClassAnnotatedWith ( string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite ) : void Takes a class annotation filter pattern and adds a so configured class annotation filter to the filter composite object.
parseDesignatorFilter ( string $operator, string $filterObjectName, PointcutFilterComposite $pointcutFilterComposite ) : void Adds a custom filter to the pointcut filter composite
parseDesignatorMethod ( string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite ) : void 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.
parseDesignatorMethodAnnotatedWith ( string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite ) : void Takes a method annotation filter pattern and adds a so configured method annotation filter to the filter composite object.
parseDesignatorPointcut ( string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite ) : void 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.
parseDesignatorSetting ( string $operator, string $configurationPath, PointcutFilterComposite $pointcutFilterComposite ) : void Adds a setting filter to the pointcut filter composite
parseDesignatorWithin ( string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite ) : void Adds a class type filter to the pointcut filter composite
parseRuntimeEvaluations ( string $operator, string $runtimeEvaluations, PointcutFilterComposite $pointcutFilterComposite ) : void Adds runtime evaluations to the pointcut filter composite

Method Details

getArgumentConstraintsFromMethodArgumentsPattern() protected method

Parses the method arguments pattern and returns the corresponding constraints array
protected getArgumentConstraintsFromMethodArgumentsPattern ( string $methodArgumentsPattern ) : array
$methodArgumentsPattern string The arguments pattern defined in the pointcut expression
return array The corresponding constraints array

getRuntimeEvaluationConditionsFromEvaluateString() protected method

Parses the evaluate string for runtime evaluations and returns the corresponding conditions array
protected getRuntimeEvaluationConditionsFromEvaluateString ( string $evaluateString ) : array
$evaluateString string The evaluate string defined in the pointcut expression
return array The corresponding constraints array

getSubstringBetweenParentheses() protected method

Returns the substring of $string which is enclosed by parentheses of the first level.
protected getSubstringBetweenParentheses ( string $string ) : string
$string string The string to parse
return string The inner part between the first level of parentheses

getVisibilityFromSignaturePattern() protected method

Parses the signature pattern and returns the visibility modifier if any. If a modifier was found, it will be removed from the $signaturePattern.
protected getVisibilityFromSignaturePattern ( &$signaturePattern ) : string
return string Visibility modifier or NULL of none was found

injectObjectManager() public method

public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
return void

injectProxyClassBuilder() public method

public injectProxyClassBuilder ( ProxyClassBuilder $proxyClassBuilder ) : void
$proxyClassBuilder Neos\Flow\Aop\Builder\ProxyClassBuilder
return void

injectReflectionService() public method

public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
return void

parse() public method

Parses a string pointcut expression and returns the pointcut objects accordingly
public parse ( string $pointcutExpression, string $sourceHint ) : PointcutFilterComposite
$pointcutExpression string The expression defining the pointcut
$sourceHint string A message giving a hint on where the expression was defined. This is used in error messages.
return PointcutFilterComposite A composite of class-filters, method-filters and pointcuts

parseAnnotationPattern() protected method

Parse an annotation pattern and adjust $annotationPattern and $annotationPropertyConstraints as needed.
protected parseAnnotationPattern ( string &$annotationPattern, array &$annotationPropertyConstraints ) : void
$annotationPattern string
$annotationPropertyConstraints array
return void

parseDesignatorClass() protected method

Takes a class filter pattern and adds a so configured class filter to the filter composite object.
protected parseDesignatorClass ( string $operator, string $classPattern, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$classPattern string The pattern expression as configuration for the class filter
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class filter) will be added to this composite object.
return void

parseDesignatorClassAnnotatedWith() protected method

Takes a class annotation filter pattern and adds a so configured class annotation filter to the filter composite object.
protected parseDesignatorClassAnnotatedWith ( string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$annotationPattern string The pattern expression as configuration for the class annotation filter
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class annotation filter) will be added to this composite object.
return void

parseDesignatorFilter() protected method

Adds a custom filter to the pointcut filter composite
protected parseDesignatorFilter ( string $operator, string $filterObjectName, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$filterObjectName string Object Name of the custom filter (value of the designator)
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) will be added to this composite object.
return void

parseDesignatorMethod() protected method

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 parseDesignatorMethod ( string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$signaturePattern string The pattern expression defining the class and method - the "signature"
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class and method filter) will be added to this composite object.
return void

parseDesignatorMethodAnnotatedWith() protected method

Takes a method annotation filter pattern and adds a so configured method annotation filter to the filter composite object.
protected parseDesignatorMethodAnnotatedWith ( string $operator, string $annotationPattern, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$annotationPattern string The pattern expression as configuration for the method annotation filter
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the method annotation filter) will be added to this composite object.
return void

parseDesignatorPointcut() protected method

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 parseDesignatorPointcut ( string $operator, string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$pointcutExpression string The pointcut expression (value of the designator)
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the pointcut filter) will be added to this composite object.
return void

parseDesignatorSetting() protected method

Adds a setting filter to the pointcut filter composite
protected parseDesignatorSetting ( string $operator, string $configurationPath, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$configurationPath string The path to the settings option, that should be used
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) will be added to this composite object.
return void

parseDesignatorWithin() protected method

Adds a class type filter to the pointcut filter composite
protected parseDesignatorWithin ( string $operator, string $signaturePattern, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string
$signaturePattern string The pattern expression defining the class type
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the class type filter) will be added to this composite object.
return void

parseRuntimeEvaluations() protected method

Adds runtime evaluations to the pointcut filter composite
protected parseRuntimeEvaluations ( string $operator, string $runtimeEvaluations, PointcutFilterComposite $pointcutFilterComposite ) : void
$operator string The operator
$runtimeEvaluations string The runtime evaluations string
$pointcutFilterComposite PointcutFilterComposite An instance of the pointcut filter composite. The result (ie. the custom filter) will be added to this composite object.
return void

Property Details

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$proxyClassBuilder protected_oe property

protected ProxyClassBuilder,Neos\Flow\Aop\Builder $proxyClassBuilder
return Neos\Flow\Aop\Builder\ProxyClassBuilder

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
return Neos\Flow\Reflection\ReflectionService

$sourceHint protected_oe property

protected string $sourceHint
return string