ServerParam
in package
implements
PermissionProviderInterface, LoggerAwareInterface
Uses
LoggerAwareTrait
ServerParam permission provider for VuFind.
Tags
Interfaces, Classes, Traits and Enums
- PermissionProviderInterface
- Permission provider interface
- LoggerAwareInterface
Table of Contents
- $aliases : array<string|int, mixed>
- Aliases for server param names (default: none)
- $request : Request
- Request object
- $serverParamDelimiter : string
- Delimiter for multi-valued server params (default: none)
- $serverParamEscape : string
- Escape character for delimiter in server param strings (default: none)
- __construct() : mixed
- Constructor
- getPermissions() : array<string|int, mixed>
- Return an array of roles which may be granted the permission based on the options.
- checkServerParam() : bool
- Check if a server param matches the option.
- 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.
- splitString() : array<string|int, mixed>
- Split string on delimiter unless dequalified with escape
Properties
$aliases
Aliases for server param names (default: none)
protected
array<string|int, mixed>
$aliases
= []
$request
Request object
protected
Request
$request
$serverParamDelimiter
Delimiter for multi-valued server params (default: none)
protected
string
$serverParamDelimiter
= ''
$serverParamEscape
Escape character for delimiter in server param strings (default: none)
protected
string
$serverParamEscape
= ''
Methods
__construct()
Constructor
public
__construct(Request $request) : mixed
Parameters
- $request : Request
-
Request object
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 provided from configuration.
Return values
array<string|int, mixed> —checkServerParam()
Check if a server param matches the option.
protected
checkServerParam(string $option) : bool
Parameters
- $option : string
-
Option
Return values
bool —true if a server param matches, false if not
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?
Return values
void —splitString()
Split string on delimiter unless dequalified with escape
protected
splitString(string $string, string $delimiter, string $escape) : array<string|int, mixed>
Parameters
- $string : string
-
String to split
- $delimiter : string
-
Delimiter character
- $escape : string
-
Escape character
Return values
array<string|int, mixed> —split string parts