SessionKey
in package
implements
PermissionProviderInterface
Uses
LoggerAwareTrait
Session key permission provider.
Tags
Interfaces, Classes, Traits and Enums
- PermissionProviderInterface
- Permission provider interface
Table of Contents
- $session : Container
- __construct() : mixed
- Constructor
- getPermissions() : array<string|int, mixed>
- Return an array of roles which may be granted the permission based on the options.
- setSessionValue() : void
- Activate a key in the Session container.
- unsetSessionValue() : void
- Deactivate a key in the Session container.
- debug() : void
- Log a debug message.
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
Properties
$session
protected
Container
$session
Methods
__construct()
Constructor
public
__construct( $session) : mixed
Parameters
Return values
mixed —getPermissions()
Return an array of roles which may be granted the permission based on the options.
public
getPermissions(mixed $options) : array<string|int, mixed>
Parameters
- $options : mixed
-
Options (sessionKeys) provided from configuration.
Return values
array<string|int, mixed> —setSessionValue()
Activate a key in the Session container.
public
setSessionValue(string $sessionKey) : void
Parameters
- $sessionKey : string
-
- Set a boolean true value for this session key.
Return values
void —unsetSessionValue()
Deactivate a key in the Session container.
public
unsetSessionValue(string $sessionKey) : void
Parameters
- $sessionKey : string
-
- Set a boolean true value for this session key.
Return values
void —debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?