Elgg
Version 2.3
|
Describes an object that manages Elgg configuration values. More...
Public Member Functions | |
getSiteUrl ($site_guid=0) | |
Get the URL for the current (or specified) site. More... | |
getPluginsPath () | |
Get the plugin path for this installation. More... | |
getDataPath () | |
Get the data directory path for this installation. More... | |
getCachePath () | |
Get the cache directory path for this installation. More... | |
get ($name, $site_guid=0) | |
Get an Elgg configuration value, possibly loading it from the DB's config table. More... | |
getVolatile ($name) | |
Get a config value for the current site if it's already loaded. More... | |
set ($name, $value) | |
Set an Elgg configuration value. More... | |
save ($name, $value, $site_guid=0) | |
Save a configuration setting. More... | |
loadSettingsFile () | |
Merge the settings file into the storage object. More... | |
Describes an object that manages Elgg configuration values.
Definition at line 7 of file Config.php.
Elgg\Services\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 |
Implemented in Elgg\Config.
Elgg\Services\Config::getCachePath | ( | ) |
Get the cache directory path for this installation.
If not set in settings.php, the data path will be returned.
Implemented in Elgg\Config.
Elgg\Services\Config::getDataPath | ( | ) |
Elgg\Services\Config::getPluginsPath | ( | ) |
Elgg\Services\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 |
Implemented in Elgg\Config.
Elgg\Services\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 |
Implemented in Elgg\Config.
Elgg\Services\Config::loadSettingsFile | ( | ) |
Merge the settings file into the storage object.
A particular location can be specified via $CONFIG->Config_file
To skip settings loading, set $CONFIG->Config_file to false
Implemented in Elgg\Config.
Elgg\Services\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 |
Implemented in Elgg\Config.
Elgg\Services\Config::set | ( | $name, | |
$value | |||
) |
Set an Elgg configuration value.
string | $name | Name of the configuration value |
mixed | $value | Value |
Implemented in Elgg\Config.