Configuration
Application configuration is stored in the Core and should be read via the Core API rather than global variables.
getConfigValue
Core::getInstance()->getConfigValue($key)
Returns the configuration value for the given top-level key (e.g. 'paths'). Keys correspond to entries in the project config array.
- Parameters:
$key(string) — Top-level config key. - Returns: The value for that key, or
falseif the key is not set. - Throws:
SystemExceptionif Core config is not defined.
Usage
Use getConfigValue() instead of reading $GLOBALS['config'] directly. This keeps config access consistent and testable.
$paths = Core::getInstance()->getConfigValue('paths');