com\setasign\SetaFramework\Permissions
HasPermissionsInterface Interface PermissionControlInterface
File: /SetaFramework/src/Permissions/HasPermissionsInterface.php
Implemented in
Summary
Methods
allow()
Allow one or more actions of a resource
Parameters
- $resource: ResourceDefinition
- $actionsOrCallback: array|string|callable|null
Exceptions
Throws \InvalidArgumentException
deny()
Deny one or more actions of a resource
Parameters
- $resource: ResourceDefinition
- $actionsOrCallback: array|string|callable|null
Exceptions
Throws \InvalidArgumentException
isAllowed()
Checks whether a action of a resource is allowed
Parameters
- $nameOrObject: object|string|ResourceDefinition
- $action: string
requirePermission()
Checks whether a action of a resource is allowed and if not an exception will be thrown
Parameters
- $nameOrObject: object|string|ResourceDefinition
- $action: string
Exceptions
Throws PermissionException If the permission is rejected!
