PHP Интерфейс Elgg\Services\Config

Показать файл Открыть проект

Открытые методы

Метод Описание
get ( string $name ) : mixed Get an Elgg configuration value, possibly loading it from the DB's config table
getCachePath ( ) : string Get the cache directory path for this installation
getDataPath ( ) : string Get the data directory path for this installation
getPluginsPath ( ) : string Get the plugin path for this installation
getSiteUrl ( ) : string Get the URL for the current (or specified) site
getVolatile ( string $name ) : mixed Get a config value for the current site if it's already loaded. This should be used instead of reading directly from global $CONFIG.
loadSettingsFile ( ) : void Merge the settings file into the storage object
remove ( string $name ) : boolean Removes a configuration setting
save ( string $name, mixed $value ) : boolean Save a configuration setting
set ( string $name, mixed $value ) : void Set an Elgg configuration value

Описание методов

get() публичный Метод

Before application boot, it may be unsafe to call get() for some values. You should use getVolatile() before system boot.
public get ( string $name ) : mixed
$name string Name of the configuration value
Результат mixed Configuration value or null if it does not exist

getCachePath() публичный Метод

If not set in settings.php, the data path will be returned.
public getCachePath ( ) : string
Результат string

getDataPath() публичный Метод

Get the data directory path for this installation
public getDataPath ( ) : string
Результат string

getPluginsPath() публичный Метод

Get the plugin path for this installation
public getPluginsPath ( ) : string
Результат string

getSiteUrl() публичный Метод

Get the URL for the current (or specified) site
public getSiteUrl ( ) : string
Результат string

getVolatile() публичный Метод

Get a config value for the current site if it's already loaded. This should be used instead of reading directly from global $CONFIG.
public getVolatile ( string $name ) : mixed
$name string Name of the configuration value
Результат mixed Returns null if value isn't set

loadSettingsFile() публичный Метод

A particular location can be specified via $CONFIG->Config_file To skip settings loading, set $CONFIG->Config_file to false
public loadSettingsFile ( ) : void
Результат void

remove() публичный Метод

Removes a configuration setting
public remove ( string $name ) : boolean
$name string Configuration name
Результат boolean

save() публичный Метод

Save a configuration setting
public save ( string $name, mixed $value ) : boolean
$name string Configuration name (cannot be greater than 255 characters)
$value mixed Configuration value. Should be string for installation setting
Результат boolean

set() публичный Метод

Set an Elgg configuration value
public set ( string $name, mixed $value ) : void
$name string Name of the configuration value
$value mixed Value
Результат void