GambioOmnibusPolicyConfigurationStorage
extends ConfigurationStorage
in package
Class GambioOmnibusPolicyConfigurationStorage
Table of Contents
- STORAGE_NAMESPACE = 'modules/gambio/omnibus_policy/configuration'
- Configuration storage namespace
- $defaults : array<string|int, mixed>
- Default configuration storage
- __construct() : mixed
- Constructor
- delete() : $this
- Removes a configuration value
- deleteAll() : $this
- Removes all configuration values related to this storage
- get() : string
- Return a configuration value
- getAll() : array<string|int, mixed>
- Return all configuration key/value pairs
- set() : $this
- Set a configuration value
- setAll() : $this
- Set multiple configuration values at one time Note: input data should ['key' => 'value']
- isAllowed() : bool
Constants
STORAGE_NAMESPACE
Configuration storage namespace
public
mixed
STORAGE_NAMESPACE
= 'modules/gambio/omnibus_policy/configuration'
Properties
$defaults
Default configuration storage
private
array<string|int, mixed>
$defaults
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —delete()
Removes a configuration value
public
delete(string $key) : $this
Parameters
- $key : string
-
Configuration key
Tags
Return values
$this —Same instance
deleteAll()
Removes all configuration values related to this storage
public
deleteAll() : $this
Tags
Return values
$this —Same instance
get()
Return a configuration value
public
get(string $key) : string
Parameters
- $key : string
-
Configuration key
Tags
Return values
string —Configuration value
getAll()
Return all configuration key/value pairs
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —Key/Value pairs
set()
Set a configuration value
public
set(string $key, string $value) : $this
Parameters
- $key : string
-
Configuration key
- $value : string
-
Configuration value
Tags
Return values
$this —Same instance
setAll()
Set multiple configuration values at one time Note: input data should ['key' => 'value']
public
setAll([array<string|int, mixed> $data = [] ]) : $this
Parameters
- $data : array<string|int, mixed> = []
Return values
$this —isAllowed()
private
isAllowed(string &$key[, bool $isOptional = false ]) : bool
Parameters
- $key : string
- $isOptional : bool = false
-
when false, return will be surprised and replaced with exception