ConfigurationStorageReader
in package
Class ConfigurationStorageReader
Table of Contents
- TABLE_NAME = 'gx_configurations'
- $connection : Connection
- $namespace : string
- __construct() : mixed
- ConfigurationStorageReader constructor.
- get() : string
- Fetches configuration value by given key.
- getAll() : array<string|int, mixed>
- Fetches all configuration values in namespace.
- is() : bool
- Checks if given key represents boolean true.
Constants
TABLE_NAME
private
mixed
TABLE_NAME
= 'gx_configurations'
Properties
$connection
private
Connection
$connection
$namespace
private
string
$namespace
Methods
__construct()
ConfigurationStorageReader constructor.
public
__construct(Connection $connection, string $namespace) : mixed
Parameters
- $connection : Connection
- $namespace : string
Return values
mixed —get()
Fetches configuration value by given key.
public
get(string $key) : string
Parameters
- $key : string
Return values
string —getAll()
Fetches all configuration values in namespace.
public
getAll([string|null $prefix = null ]) : array<string|int, mixed>
If $prefix is provided, only keys with matching prefix are fetched.
Parameters
- $prefix : string|null = null
Return values
array<string|int, mixed> —is()
Checks if given key represents boolean true.
public
is(string $key) : bool
Parameters
- $key : string