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='')
 
 __get ($name)
 
 set ($name, $value)
 

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::set (   $name,
  $value 
)

This method is provided solely for manipulating the environment during unit tests. Values set this way will not be stored permanently or persist beyond the end of the current script

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: