AbstractAclService
in package
AbstractYes
Table of Contents
Methods
- getIdentity() : IdentityInterface|null
- Gets the user identity if logged in or null otherwise
- hasIdentity() : bool
- Checks whether the user is logged in
- isAllowed() : bool
- Check if a operation is allowed for the current role.
- getAcl() : Acl
- Get the ACL.
- getRole() : string|RoleInterface
- Get the current user's role.
Methods
getIdentity()
Gets the user identity if logged in or null otherwise
public
abstract getIdentity() : IdentityInterface|null
Return values
IdentityInterface|null —the current logged in user
hasIdentity()
Checks whether the user is logged in
public
hasIdentity() : bool
Return values
bool —true if the user is logged in, false otherwise
isAllowed()
Check if a operation is allowed for the current role.
public
isAllowed(string $operation, string|ResourceInterface $resource) : bool
Parameters
- $operation : string
-
operation to be checked
- $resource : string|ResourceInterface
-
Resource to be checked
Return values
boolgetAcl()
Get the ACL.
protected
abstract getAcl() : Acl
Return values
AclgetRole()
Get the current user's role.
protected
abstract getRole() : string|RoleInterface