Configuration registry.
More...
|
static | getBool ( $name, $default=false) |
| Get a boolean value.
|
|
static | getStr ( $name, $default='') |
| Get a string value.
|
|
static | getDate ( $name) |
| Get a date value.
|
|
static | load ( $file) |
| Load configuration data from file.
|
|
Configuration registry.
- Author
- Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
- Copyright
- © 2015 Bryan Davis, Wikimedia Foundation and contributors.
◆ getBool()
static Wikimedia\Slimapp\Config::getBool |
( |
| $name, |
|
|
| $default = false ) |
|
static |
Get a boolean value.
- Parameters
-
string | $name | Setting name |
bool | $default | Default value if none found |
- Returns
- bool Value
◆ getDate()
static Wikimedia\Slimapp\Config::getDate |
( |
| $name | ) |
|
|
static |
Get a date value.
- Parameters
-
- Returns
- int|bool Unix timestamp or false if not found
◆ getStr()
static Wikimedia\Slimapp\Config::getStr |
( |
| $name, |
|
|
| $default = '' ) |
|
static |
Get a string value.
- Parameters
-
string | $name | Setting name |
string | $default | Default value if none found |
- Returns
- string Value
◆ load()
static Wikimedia\Slimapp\Config::load |
( |
| $file | ) |
|
|
static |
Load configuration data from file.
Reads ini file style configuration settings from the given file and loads the values into the application's environment. This is useful in deployments where the use of the container environment for configuration is discouraged.
- Parameters
-
string | $file | Path to config file |
The documentation for this class was generated from the following file: