MethodPrivilege
class MethodPrivilege extends AbstractPrivilege implements MethodPrivilegeInterface (View source)
A method privilege, able to restrict method calls based on pointcut expressions
Properties
protected ObjectManagerInterface | $objectManager | from AbstractPrivilege | |
protected string | $cacheEntryIdentifier | Unique identifier of this privilege (used for cache entries) |
from AbstractPrivilege |
protected PrivilegeTarget | $privilegeTarget | from AbstractPrivilege | |
protected PrivilegeParameterInterface[] | $parameters | from AbstractPrivilege | |
protected string | $matcher | from AbstractPrivilege | |
protected string | $parsedMatcher | from AbstractPrivilege | |
protected string | $permission | from AbstractPrivilege | |
static protected array | $methodPermissions | ||
protected PointcutFilterComposite | $pointcutFilter | ||
protected RuntimeExpressionEvaluator | $runtimeExpressionEvaluator |
Methods
This object is created very early so we can't rely on AOP for the property injection This method also takes care of initializing caches and other dependencies.
No description
Initializes the unique cache entry identifier
Unique identifier for the related privilege target (e.g. "Neos.Flow:PublicMethods")
A matcher string, describing the privilegeTarget (e.g. pointcut expression for methods or EEL expression for entities)
Returns the matcher string with replaced parameter markers.
No description
Returns true, if this privilege covers the given subject (join point)
Returns true, if this privilege covers the given method
Returns the pointcut filter composite, matching all methods covered by this privilege
Details
void
injectObjectManager(ObjectManagerInterface $objectManager)
This object is created very early so we can't rely on AOP for the property injection This method also takes care of initializing caches and other dependencies.
__construct(PrivilegeTarget $privilegeTarget, string $matcher, string $permission, array $parameters)
No description
protected void
buildCacheEntryIdentifier()
Initializes the unique cache entry identifier
string
getCacheEntryIdentifier()
Unique identifier of this privilege
PrivilegeParameterInterface[]
getParameters()
No description
bool
hasParameters()
No description
string
getPermission()
No description
bool
isGranted()
No description
bool
isAbstained()
No description
bool
isDenied()
No description
PrivilegeTarget
getPrivilegeTarget()
The related privilege target
string
getPrivilegeTargetIdentifier()
Unique identifier for the related privilege target (e.g. "Neos.Flow:PublicMethods")
string
getMatcher()
A matcher string, describing the privilegeTarget (e.g. pointcut expression for methods or EEL expression for entities)
Note: This returns the raw matcher string that might contain parameter placeholders. If you want to return the parsed matcher with placeholders replaced, use getParsedMatcher() instead.
string
getParsedMatcher()
Returns the matcher string with replaced parameter markers.
getMatcher()
protected void
initialize()
No description
bool
matchesSubject(PrivilegeSubjectInterface $subject)
Returns true, if this privilege covers the given subject (join point)
bool
matchesMethod(string $className, string $methodName)
Returns true, if this privilege covers the given method
PointcutFilterComposite
getPointcutFilterComposite()
Returns the pointcut filter composite, matching all methods covered by this privilege