CORE POS - Fannie
The CORE POS back end
Public Member Functions | Static Public Member Functions | List of all members
FannieConfig Class Reference

Public Member Functions

 reload ()
 
 toJSON ()
 
 get ($name, $default='')
 

Static Public Member Functions

static factory ()
 
static config ($name, $default='')
 

Member Function Documentation

static FannieConfig::factory ( )
static

Generate a singleton FannieConfig instance as needed

FannieConfig::get (   $name,
  $default = '' 
)

Get configuration value

Parameters
$name[string] name of setting
$default[optional, empty string] value returned if the setting does not exist

For brevity, $name can omit the FANNIE_ prefix. For instance, "FANNIE_URL" and "URL" will return the same value.

FannieConfig::reload ( )

Reload configuration values from file Loads from config.php by default. Also supports a config.json alternative.

FannieConfig::toJSON ( )

Utility: write current configuration in JSON format Not super helpful since it needs lint-ing


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