MethodPrivilegePointcutFilter
class MethodPrivilegePointcutFilter implements PointcutFilterInterface (View source)
Pointcut filter which connects the method privileges to the AOP framework
Properties
protected PointcutFilterComposite[] | $filters | ||
protected array | $methodPermissions | ||
protected VariableFrontend | $methodPermissionCache | ||
protected ObjectManagerInterface | $objectManager | ||
protected RuntimeExpressionEvaluator | $runtimeExpressionEvaluator |
Methods
This object is created very early so we can't rely on AOP for the property injection
No description
Checks if the specified class and method matches against the filter, i.e. if there is a policy entry to intercept this method.
Returns true if this filter holds runtime evaluations for a previously matched pointcut
Returns runtime evaluations for the pointcut.
This method is used to optimize the matching process.
No description
Builds the needed pointcut filters for matching the policy privileges
Save the found matches to the cache.
Details
void
injectObjectManager(ObjectManagerInterface $objectManager)
This object is created very early so we can't rely on AOP for the property injection
void
initializeObject()
No description
bool
matches(string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier)
Checks if the specified class and method matches against the filter, i.e. if there is a policy entry to intercept this method.
This method also creates a cache entry for every method, to cache the associated roles and privileges.
bool
hasRuntimeEvaluationsDefinition()
Returns true if this filter holds runtime evaluations for a previously matched pointcut
array
getRuntimeEvaluationsDefinition()
Returns runtime evaluations for the pointcut.
ClassNameIndex
reduceTargetClassNames(ClassNameIndex $classNameIndex)
This method is used to optimize the matching process.
protected Closure
getFilterEvaluator(string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier)
No description
protected void
buildPointcutFilters()
Builds the needed pointcut filters for matching the policy privileges
void
savePolicyCache()
Save the found matches to the cache.