PHP 인터페이스 Elgg\Services\Config

파일 보기 프로젝트 열기: elgg/elgg

공개 메소드들

메소드 설명
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