Elgg
Version 2.3
|
Access to configuration values. More...
Public Member Functions | ||||||||||
__construct (\stdClass $config=null, $set_global=true) | ||||||||||
Constructor. More... | ||||||||||
getSiteUrl ($site_guid=0) | ||||||||||
{Get the URL for the current (or specified) site.
| ||||||||||
getPluginsPath () | ||||||||||
{Get the plugin path for this installation.
| ||||||||||
getCookieConfig () | ||||||||||
Set up and return the cookie configuration array resolved from settings.php. More... | ||||||||||
getDataPath () | ||||||||||
{Get the data directory path for this installation.
| ||||||||||
getCachePath () | ||||||||||
{Get the cache directory path for this installation.If not set in settings.php, the data path will be returned.
| ||||||||||
get ($name, $site_guid=0) | ||||||||||
{Get an Elgg configuration value, possibly loading it from the DB's config table.Before application boot, it may be unsafe to call get() for some values. You should use getVolatile() before system boot.
| ||||||||||
getVolatile ($name) | ||||||||||
{Get a config value for the current site if it's already loaded.This should be used instead of reading directly from global $CONFIG.
| ||||||||||
set ($name, $value) | ||||||||||
{Set an Elgg configuration value.
| ||||||||||
save ($name, $value, $site_guid=0) | ||||||||||
{Save a configuration setting.
| ||||||||||
getSettingsPaths () | ||||||||||
Get expected settings file paths. More... | ||||||||||
loadSettingsFile () | ||||||||||
{Merge the settings file into the storage object.A particular location can be specified via $CONFIG->Config_fileTo skip settings loading, set $CONFIG->Config_file to false
| ||||||||||
getStorageObject () | ||||||||||
Get the raw object used for storage. More... | ||||||||||
Elgg\Config::__construct | ( | \stdClass | $config = null , |
$set_global = true |
|||
) |
Constructor.
Configuration values.
The $CONFIG global contains configuration values required for running Elgg as defined in the settings.php file.
Plugin authors are encouraged to use elgg_get_config() instead of accessing the global directly.
Definition at line 37 of file Config.php.
Elgg\Config::get | ( | $name, | |
$site_guid = 0 |
|||
) |
{Get an Elgg configuration value, possibly loading it from the DB's config table.Before application boot, it may be unsafe to call get() for some values. You should use getVolatile() before system boot.
string | $name | Name of the configuration value |
int | $site_guid | null for installation setting, 0 for default site |
Implements Elgg\Services\Config.
Definition at line 151 of file Config.php.
Elgg\Config::getCachePath | ( | ) |
{Get the cache directory path for this installation.If not set in settings.php, the data path will be returned.
Implements Elgg\Services\Config.
Definition at line 138 of file Config.php.
Elgg\Config::getCookieConfig | ( | ) |
Set up and return the cookie configuration array resolved from settings.php.
Definition at line 93 of file Config.php.
Elgg\Config::getDataPath | ( | ) |
{Get the data directory path for this installation.
Implements Elgg\Services\Config.
Definition at line 127 of file Config.php.
Elgg\Config::getPluginsPath | ( | ) |
{Get the plugin path for this installation.
Implements Elgg\Services\Config.
Definition at line 84 of file Config.php.
Elgg\Config::getSettingsPaths | ( | ) |
Get expected settings file paths.
Definition at line 239 of file Config.php.
Elgg\Config::getSiteUrl | ( | $site_guid = 0 | ) |
{Get the URL for the current (or specified) site.
int | $site_guid | The GUID of the site whose URL we want to grab |
Implements Elgg\Services\Config.
Definition at line 66 of file Config.php.
Elgg\Config::getStorageObject | ( | ) |
Get the raw object used for storage.
We need this, for now, to construct some services.
Definition at line 327 of file Config.php.
Elgg\Config::getVolatile | ( | $name | ) |
{Get a config value for the current site if it's already loaded.This should be used instead of reading directly from global $CONFIG.
string | $name | Name of the configuration value |
Implements Elgg\Services\Config.
Definition at line 191 of file Config.php.
Elgg\Config::loadSettingsFile | ( | ) |
{Merge the settings file into the storage object.A particular location can be specified via $CONFIG->Config_fileTo skip settings loading, set $CONFIG->Config_file to false
Implements Elgg\Services\Config.
Definition at line 250 of file Config.php.
Elgg\Config::save | ( | $name, | |
$value, | |||
$site_guid = 0 |
|||
) |
{Save a configuration setting.
string | $name | Configuration name (cannot be greater than 255 characters) |
mixed | $value | Configuration value. Should be string for installation setting |
int | $site_guid | null for installation setting, 0 for default site |
Implements Elgg\Services\Config.
Definition at line 206 of file Config.php.
Elgg\Config::set | ( | $name, | |
$value | |||
) |
{Set an Elgg configuration value.
string | $name | Name of the configuration value |
mixed | $value | Value |
Implements Elgg\Services\Config.
Definition at line 198 of file Config.php.