PHP Class Neos\Flow\Security\Authorization\Privilege\AbstractPrivilege

Inheritance: implements Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$cacheEntryIdentifier string Unique identifier of this privilege (used for cache entries)
$matcher string
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$parameters Neos\Flow\Security\Authorization\Privilege\Parameter\PrivilegeParameterInterface[]
$parsedMatcher string
$permission One of the constants ABSTAIN, GRANT or DENY
$privilegeTarget PrivilegeTarget

Public Methods

Method Description
__construct ( PrivilegeTarget $privilegeTarget, string $matcher, string $permission, array $parameters )
getCacheEntryIdentifier ( ) : string Unique identifier of this privilege
getMatcher ( ) : string A matcher string, describing the privilegeTarget (e.g. pointcut expression for methods or EEL expression for entities)
getParameters ( ) : Neos\Flow\Security\Authorization\Privilege\Parameter\PrivilegeParameterInterface[]
getParsedMatcher ( ) : string Returns the matcher string with replaced parameter markers.
getPermission ( ) : integer
getPrivilegeTarget ( ) : PrivilegeTarget The related privilege target
getPrivilegeTargetIdentifier ( ) : string Unique identifier for the related privilege target (e.g. "Neos.Flow:PublicMethods")
hasParameters ( ) : boolean
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void This object is created very early so we can't rely on AOP for the property injection
isAbstained ( ) : boolean
isDenied ( ) : boolean
isGranted ( ) : boolean

Protected Methods

Method Description
buildCacheEntryIdentifier ( ) : void Initializes the unique cache entry identifier

Method Details

__construct() public method

public __construct ( PrivilegeTarget $privilegeTarget, string $matcher, string $permission, array $parameters )
$privilegeTarget PrivilegeTarget
$matcher string
$permission string One of the constants GRANT, DENY or ABSTAIN
$parameters array

buildCacheEntryIdentifier() protected method

Initializes the unique cache entry identifier
protected buildCacheEntryIdentifier ( ) : void
return void

getCacheEntryIdentifier() public method

Unique identifier of this privilege
public getCacheEntryIdentifier ( ) : string
return string

getMatcher() public method

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.
public getMatcher ( ) : string
return string

getParameters() public method

public getParameters ( ) : Neos\Flow\Security\Authorization\Privilege\Parameter\PrivilegeParameterInterface[]
return Neos\Flow\Security\Authorization\Privilege\Parameter\PrivilegeParameterInterface[]

getParsedMatcher() public method

@see getMatcher()
public getParsedMatcher ( ) : string
return string

getPermission() public method

public getPermission ( ) : integer
return integer

getPrivilegeTarget() public method

The related privilege target
public getPrivilegeTarget ( ) : PrivilegeTarget
return PrivilegeTarget

getPrivilegeTargetIdentifier() public method

Unique identifier for the related privilege target (e.g. "Neos.Flow:PublicMethods")

hasParameters() public method

public hasParameters ( ) : boolean
return boolean

injectObjectManager() public method

This object is created very early so we can't rely on AOP for the property injection
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
return void

isAbstained() public method

public isAbstained ( ) : boolean
return boolean

isDenied() public method

public isDenied ( ) : boolean
return boolean

isGranted() public method

public isGranted ( ) : boolean
return boolean

Property Details

$cacheEntryIdentifier protected property

Unique identifier of this privilege (used for cache entries)
protected string $cacheEntryIdentifier
return string

$matcher protected property

protected string $matcher
return string

$objectManager protected property

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

$parameters protected property

protected PrivilegeParameterInterface[],Neos\Flow\Security\Authorization\Privilege\Parameter $parameters
return Neos\Flow\Security\Authorization\Privilege\Parameter\PrivilegeParameterInterface[]

$parsedMatcher protected property

protected string $parsedMatcher
return string

$permission protected property

One of the constants ABSTAIN, GRANT or DENY
protected $permission

$privilegeTarget protected property

protected PrivilegeTarget,Neos\Flow\Security\Authorization\Privilege $privilegeTarget
return PrivilegeTarget