GXModuleConfigurationStorage
extends ConfigurationStorage
in package
subclass of ConfigurationStorage for parameters concerning GXModules
Table of Contents
- $config : array<string|int, mixed>|bool
- Holds the configuration from GXModule.json file
- __construct() : mixed
- constructor; initializes namespace for GXModule configuration with correct namespace
- get() : string|array<string|int, mixed>|null
- Returns a single configuration value by its key if stored as json decode automaticaly
- _getDefaultValueFromJsonFile() : mixed
- Returns the default value of the configuration key
- _getGXModuleJSONConfiguration() : array<string|int, mixed>|bool
- Get the json configuration from GXModule.json file
- isJson() : bool
- Helper function to check if string is json formated
Properties
$config
Holds the configuration from GXModule.json file
protected
array<string|int, mixed>|bool
$config
Methods
__construct()
constructor; initializes namespace for GXModule configuration with correct namespace
public
__construct(string $module) : mixed
Parameters
- $module : string
-
VendorModulename directory of GXModule
Return values
mixed —get()
Returns a single configuration value by its key if stored as json decode automaticaly
public
get(string $key[, LanguageCode $languageCode = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string
-
a configuration key (relative to the namespace prefix)
- $languageCode : LanguageCode = null
-
Optional for language dependent config values.
Return values
string|array<string|int, mixed>|null —configuration value
_getDefaultValueFromJsonFile()
Returns the default value of the configuration key
protected
_getDefaultValueFromJsonFile( $key) : mixed
Parameters
Return values
mixed —_getGXModuleJSONConfiguration()
Get the json configuration from GXModule.json file
protected
_getGXModuleJSONConfiguration( $name) : array<string|int, mixed>|bool
Parameters
Return values
array<string|int, mixed>|bool —isJson()
Helper function to check if string is json formated
protected
isJson(string $string) : bool
Parameters
- $string : string