ConfigurationCompatibilityService
in package
Class ConfigurationCompatibilityService
Tags
Table of Contents
- $connection : Connection
- $gmConfigCache : array<string|int, mixed>
- __construct() : mixed
- ConfigurationCompatibilityService constructor.
- gmGetConf() : array<string|int, string>|string|false|null
- buildGmArray() : array<string|int, mixed>
- Builds the internal data array that holds all configuration until the request is finished or a rebuild is requested.
- buildGmCache() : void
- Rebuilds the cached data of the gm_configuration namespace.
- isEmptyGmCache() : bool
- Checks if the cached data of the gm_configuration namespace is empty.
- isValidKeyAndType() : bool
- Validates the $key and $type argument.
- shouldReturnArray() : bool
- Checks the $key argument. If it is an array, multiple configurations are requested.
- shouldReturnAssoc() : bool
- Checks the $type argument that determines the format of the returned array if multiple configurations are requested.
Properties
$connection
private
Connection
$connection
$gmConfigCache
private
array<string|int, mixed>
$gmConfigCache
= []
Methods
__construct()
ConfigurationCompatibilityService constructor.
public
__construct(Connection $connection) : mixed
Parameters
- $connection : Connection
Return values
mixed —gmGetConf()
public
gmGetConf(string|array<string|int, mixed> $key[, string $type = 'ASSOC' ][, bool $rebuildCache = false ]) : array<string|int, string>|string|false|null
Parameters
- $key : string|array<string|int, mixed>
- $type : string = 'ASSOC'
- $rebuildCache : bool = false
Return values
array<string|int, string>|string|false|null —buildGmArray()
Builds the internal data array that holds all configuration until the request is finished or a rebuild is requested.
private
buildGmArray(array<string|int, mixed> $keys, string $type) : array<string|int, mixed>
Parameters
- $keys : array<string|int, mixed>
- $type : string
Return values
array<string|int, mixed> —buildGmCache()
Rebuilds the cached data of the gm_configuration namespace.
private
buildGmCache() : void
Return values
void —isEmptyGmCache()
Checks if the cached data of the gm_configuration namespace is empty.
private
isEmptyGmCache() : bool
Return values
bool —isValidKeyAndType()
Validates the $key and $type argument.
private
isValidKeyAndType(mixed $key, string $type) : bool
The argument $key can be either of type string or an array of strings to request multiple configurations. The $type argument is an enum value and expected to be either "NUMERIC" or "ASSOC".
Parameters
- $key : mixed
- $type : string
Return values
bool —shouldReturnArray()
Checks the $key argument. If it is an array, multiple configurations are requested.
private
shouldReturnArray( $key) : bool
Parameters
Return values
bool —shouldReturnAssoc()
Checks the $type argument that determines the format of the returned array if multiple configurations are requested.
private
shouldReturnAssoc(string $type) : bool
Parameters
- $type : string