ConfigProvider
    
            
            in package
            
        
    
    
    
A singleton config class.
Tags
Table of Contents
Properties
- $configVars : array<string|int, mixed>
- Array to store the config variables.
- $environment : string
- The config environment (dev, pro, test).
- $instance : ConfigProvider
- The config object singleton.
Methods
- get() : string
- Get config value.
- getEnvironment() : string
- Get the configuration environment for this application.
- getInstance() : ConfigProvider|ConfigCallbacks
- Get the config object instance.
- reloadConfig() : void
- Reloads the config from the relevent .ini file, dependant upon the current environment (hostname).
- set() : void
- Set config value.
- __construct() : mixed
- Private constructor means the class cannot be instantiated from elsewhere.
- loadConfig() : void
- Loads the config from the relevent .ini file, dependant upon the current environment (hostname).
- setRootPath() : void
- Sets the root directory of the application.
Properties
$configVars
Array to store the config variables.
    private
        array<string|int, mixed>
    $configVars
     = array()
    
    
    
    Tags
$environment
The config environment (dev, pro, test).
    private
        string
    $environment
    
    
    
    
    Tags
$instance
The config object singleton.
    private
    static    ConfigProvider
    $instance
    
    
    
    
    Tags
Methods
get()
Get config value.
    public
                    get(string $key) : string
    Parameters
- $key : string
- 
                    string 
Tags
Return values
stringgetEnvironment()
Get the configuration environment for this application.
    public
                    getEnvironment() : string
    Tags
Return values
stringgetInstance()
Get the config object instance.
    public
            static        getInstance() : ConfigProvider|ConfigCallbacks
    Tags
Return values
ConfigProvider|ConfigCallbacksreloadConfig()
Reloads the config from the relevent .ini file, dependant upon the current environment (hostname).
    public
                    reloadConfig() : void
    Tags
set()
Set config value.
    public
                    set( $key,  $val) : void
    Parameters
Tags
__construct()
Private constructor means the class cannot be instantiated from elsewhere.
    private
                    __construct() : mixed
    Tags
loadConfig()
Loads the config from the relevent .ini file, dependant upon the current environment (hostname).
    private
                    loadConfig() : void
    Tags
setRootPath()
Sets the root directory of the application.
    private
                    setRootPath() : void