Wikimedia SlimApp
Common classes to help with creating an application using the Slim micro framework and Twig template engine.
Loading...
Searching...
No Matches
Wikimedia\Slimapp\Config Class Reference

Configuration registry. More...

Static Public Member Functions

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.
 

Detailed Description

Configuration registry.

Author
Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g

Member Function Documentation

◆ getBool()

static Wikimedia\Slimapp\Config::getBool ( $name,
$default = false )
static

Get a boolean value.

Parameters
string$nameSetting name
bool$defaultDefault value if none found
Returns
bool Value

◆ getDate()

static Wikimedia\Slimapp\Config::getDate ( $name)
static

Get a date value.

Parameters
string$nameSetting name
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$nameSetting name
string$defaultDefault 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$filePath to config file

The documentation for this class was generated from the following file: