Static Public Member Functions | Static Protected Attributes

Config Class Reference

List of all members.

Static Public Member Functions

static exists ($key)
static get ($key, $default=null)
static set ($key, $val)
static clear ($key)

Static Protected Attributes

static $registry = array()
static $prefix = 'habari_'

Detailed Description

Habari Config Class

Configuration registry class

Definition at line 17 of file config.php.


Member Function Documentation

static Config::clear ( key  )  [static]

Unset data

Parameters:
string $key key name
Returns:
void

Definition at line 109 of file config.php.

static Config::exists ( key  )  [static]

See if a key exists

Parameters:
string $key key name
Returns:
bool

Definition at line 38 of file config.php.

Referenced by InstallHandler::act_begin_install(), get(), Options::get_all_options(), Options::is_static(), and set().

static Config::get ( key,
default = null 
) [static]

Fetch data from registry

Parameters:
string $key key name
null $default
Returns:
mixed (empty object on invalid key)

Definition at line 57 of file config.php.

Referenced by RemoteRequest::__construct(), MemcacheCache::__construct(), InstallHandler::act_begin_install(), DB::connect(), Options::get_all_options(), Site::get_url(), Session::init(), DatabaseConnection::load_tables(), Session::read(), and InstallHandler::upgrade_db().

static Config::set ( key,
val 
) [static]

Set data in registry

Note: arrays become objects for easy fetching

Parameters:
string $key key name
mixed $val value to store
Returns:
bool true if new key, false if key already exists

Definition at line 90 of file config.php.

Referenced by InstallHandler::act_begin_install(), InstallHandler::check_mysql(), and InstallHandler::check_pgsql().


Member Data Documentation

Config::$registry = array() [static, protected]

Registry of configuration data

Definition at line 22 of file config.php.


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