com\setasign\SetaFramework\Permissions
Role Class Permissions Role
File: /SetaFramework/src/Permissions/Role.php
Class hierarchy
Implements
Summary
Properties
$inheritedRole
private ?Role Role::$inheritedRole
Variable for the inherited role
Methods
__construct()
allow()
Allow one or more actions of a resource
Parameters
- $resource : ResourceDefinition
- $actionsOrCallback : array|string|callable|null
Exceptions
Throws \InvalidArgumentException
checkOwnPermissions()
Parameters
- $name : string
- the ResourceDefinition name
- $actionName : string
- the action name
- $object : ?object
- the allowed/denied object
Return Values
- 1 : allowed, -1 : denied
deny()
Deny one or more actions of a resource
Parameters
- $resource : ResourceDefinition
- $actionsOrCallback : array|string|callable|null
Exceptions
Throws \InvalidArgumentException
requirePermission()
Checks whether a action of a resource is allowed and if not an exception will be thrown
Parameters
- $nameOrObject : object|string
- $action : string
Exceptions
Throws PermissionException If the permission is rejected!
