class Config (View source)

The Config class.

Methods

static array
read()

Read configuration overrides as JSON string form PHP or JSON file and decode the returned string. Note that now the configuration is stored in PHP files instead of JSON files to make it less easy to access from outside.

static boolean
write(array $config)

Write the configuration file.

static 
overrides()

Define constants based on the configuration array.

static 
set(string $name, string $value)

Define constant, if not defined already.

Details

static array read()

Read configuration overrides as JSON string form PHP or JSON file and decode the returned string. Note that now the configuration is stored in PHP files instead of JSON files to make it less easy to access from outside.

Return Value

array The configuration array

static boolean write(array $config)

Write the configuration file.

Parameters

array $config

Return Value

boolean True on success

static overrides()

Define constants based on the configuration array.

static set(string $name, string $value)

Define constant, if not defined already.

Parameters

string $name
string $value