|
| static | factory (string $settings_path='') |
| | Build a config from default settings locations. More...
|
| |
| static | resolvePath (string $settings_path='') |
| | Resolve settings path. More...
|
| |
Definition at line 134 of file Config.php.
◆ __construct()
| Elgg\Config::__construct |
( |
array |
$values = [] | ) |
|
Constructor.
- Parameters
-
| array | $values | Initial config values from Env/settings file |
Definition at line 263 of file Config.php.
◆ __get()
| Elgg\Config::__get |
( |
string |
$name | ) |
|
Get an Elgg configuration value if it's been set or loaded during the boot process.
Before \Elgg\BootService::boot, values from the database will not be present.
- Parameters
-
- Returns
- mixed null if does not exist
Definition at line 432 of file Config.php.
◆ __isset()
| Elgg\Config::__isset |
( |
string |
$name | ) |
|
Handle isset()
- Parameters
-
- Returns
- bool
Definition at line 521 of file Config.php.
◆ __set()
| Elgg\Config::__set |
( |
string |
$name, |
|
|
|
$value |
|
) |
| |
Set an Elgg configuration value.
- Warning
- This does not persist the configuration setting. Use elgg_save_config()
- Parameters
-
| string | $name | Name |
| mixed | $value | Value |
- Returns
- void
Definition at line 503 of file Config.php.
◆ __unset()
| Elgg\Config::__unset |
( |
string |
$name | ) |
|
Handle unset()
- Parameters
-
- Returns
- void
Definition at line 531 of file Config.php.
◆ factory()
| static Elgg\Config::factory |
( |
string |
$settings_path = '' | ) |
|
|
static |
Build a config from default settings locations.
- Parameters
-
| string | $settings_path | Path of settings file |
- Returns
- Config
Definition at line 295 of file Config.php.
◆ fromFile()
| static Elgg\Config::fromFile |
( |
|
$path | ) |
|
|
staticprotected |
Build a config from a file.
- Parameters
-
| string | $path | Path of settings.php |
- Returns
- Config
- Exceptions
-
Definition at line 309 of file Config.php.
◆ getCookieConfig()
| Elgg\Config::getCookieConfig |
( |
| ) |
|
Set up and return the cookie configuration array resolved from settings.
- Returns
- array
Definition at line 389 of file Config.php.
◆ getInitialValue()
| Elgg\Config::getInitialValue |
( |
string |
$name | ) |
|
Get a value set at construction time.
- Parameters
-
- Returns
- mixed null = not set
Definition at line 467 of file Config.php.
◆ getValues()
| Elgg\Config::getValues |
( |
| ) |
|
Get all values.
- Returns
- array
Definition at line 380 of file Config.php.
◆ hasInitialValue()
| Elgg\Config::hasInitialValue |
( |
string |
$name | ) |
|
Was a value available at construction time? (From settings.php)
- Parameters
-
- Returns
- bool
Definition at line 478 of file Config.php.
◆ hasValue()
| Elgg\Config::hasValue |
( |
string |
$name | ) |
|
Test if we have a set value.
- Parameters
-
- Returns
- bool
Definition at line 457 of file Config.php.
◆ isLocked()
| Elgg\Config::isLocked |
( |
string |
$name | ) |
|
Is this value locked?
- Parameters
-
- Returns
- bool
Definition at line 489 of file Config.php.
◆ remove()
| Elgg\Config::remove |
( |
string |
$name | ) |
|
Removes a configuration setting from the database.
- Parameters
-
| string | $name | Configuration name |
- Returns
- bool
Definition at line 576 of file Config.php.
◆ resolvePath()
| static Elgg\Config::resolvePath |
( |
string |
$settings_path = '' | ) |
|
|
static |
Resolve settings path.
- Parameters
-
| string | $settings_path | Path of settings file |
- Returns
- string
Definition at line 367 of file Config.php.
◆ save()
| Elgg\Config::save |
( |
string |
$name, |
|
|
|
$value |
|
) |
| |
Save a configuration setting to the database.
- Parameters
-
| string | $name | Name (cannot be greater than 255 characters) |
| mixed | $value | Value |
- Returns
- bool
Definition at line 547 of file Config.php.
◆ saveInitialValues()
| Elgg\Config::saveInitialValues |
( |
array |
$values | ) |
|
|
protected |
Stores the inital values.
- Parameters
-
| array | $values | The initial values |
- Returns
- void
Definition at line 279 of file Config.php.
◆ wasWarnedLocked()
| Elgg\Config::wasWarnedLocked |
( |
string |
$name | ) |
|
|
protected |
Log a read-only warning if the name is read-only.
- Parameters
-
- Returns
- bool
Definition at line 594 of file Config.php.
◆ $config_defaults
| array Elgg\Config::$config_defaults |
|
protected |
Holds the set of default values.
Definition at line 166 of file Config.php.
◆ $deprecated
| array Elgg\Config::$deprecated = [] |
|
protected |
An array of deprecated config options in the format 'option' => '<version number when deprecated>'.
Definition at line 161 of file Config.php.
◆ $locked_values
| array Elgg\Config::$locked_values |
|
protected |
Initial value:= [
'assetroot',
'cacheroot',
'dataroot',
'installed',
'plugins_path',
'wwwroot',
]
The following values can only be set once.
Definition at line 149 of file Config.php.
◆ $path_properties
| array Elgg\Config::$path_properties |
|
protected |
Initial value:= [
'assetroot',
'cacheroot',
'dataroot',
'plugins_path',
]
The path properties will be sanitized when set.
Definition at line 229 of file Config.php.
◆ ENTITY_TYPES
| const Elgg\Config::ENTITY_TYPES = ['group', 'object', 'site', 'user'] |
◆ SENSITIVE_PROPERTIES
| const Elgg\Config::SENSITIVE_PROPERTIES |
Initial value:= [
'__site_secret__',
'db',
'dbhost',
'dbport',
'dbuser',
'dbpass',
'dbname',
]
Definition at line 248 of file Config.php.
The documentation for this class was generated from the following file: