Elgg  Version 1.11
Public Member Functions | List of all members
Elgg\Database\ConfigTable Class Reference

Public Member Functions

 __construct ()
 Constructor. More...
 
 remove ($name, $site_guid=0)
 Removes a config setting. More...
 
 set ($name, $value, $site_guid=0)
 Add or update a config setting. More...
 
 get ($name, $site_guid=0)
 Gets a configuration value. More...
 
 loadAll ($site_guid=0)
 Loads all configuration values from the dbprefix_config table into $CONFIG. More...
 

Detailed Description

Definition at line 16 of file ConfigTable.php.

Constructor & Destructor Documentation

Elgg\Database\ConfigTable::__construct ( )

Constructor.

Definition at line 28 of file ConfigTable.php.

Member Function Documentation

Elgg\Database\ConfigTable::get (   $name,
  $site_guid = 0 
)

Gets a configuration value.

Plugin authors should use elgg_get_config().

Note
Internal: These settings are stored in the dbprefix_config table and read during system boot into $CONFIG.
Parameters
string$nameThe name of the config value
int$site_guidOptionally, the GUID of the site (default: current site)
Returns
mixed|null

Definition at line 124 of file ConfigTable.php.

Elgg\Database\ConfigTable::loadAll (   $site_guid = 0)

Loads all configuration values from the dbprefix_config table into $CONFIG.

Parameters
int$site_guidOptionally, the GUID of the site (current site is assumed by default)
Returns
bool

Definition at line 189 of file ConfigTable.php.

Elgg\Database\ConfigTable::remove (   $name,
  $site_guid = 0 
)

Removes a config setting.

Parameters
string$nameThe name of the field.
int$site_guidOptionally, the GUID of the site (default: current site).
Returns
bool Success or failure

Definition at line 41 of file ConfigTable.php.

Elgg\Database\ConfigTable::set (   $name,
  $value,
  $site_guid = 0 
)

Add or update a config setting.

Plugin authors should use elgg_set_config().

If the config name already exists, it will be updated to the new value.

Warning
Names should be selected so as not to collide with the names for the datalist (application configuration)
Note
Internal: These settings are stored in the dbprefix_config table and read during system boot into $CONFIG.
Internal: The value is serialized so we maintain type information.
Parameters
string$nameThe name of the configuration value
mixed$valueIts value
int$site_guidOptionally, the GUID of the site (current site is assumed by default)
Returns
bool

Definition at line 82 of file ConfigTable.php.


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