|
static | factory ($settings_path= '', $try_env=true) |
| Build a config from default settings locations. More...
|
|
static | fromFile ($path, &$reason= '') |
| Build a config from a file. More...
|
|
static | resolvePath ($settings_path= '', $try_env=true) |
| Resolve settings path. More...
|
|
Definition at line 145 of file Config.php.
Elgg\Config::__construct |
( |
array |
$values = [] | ) |
|
Constructor.
- Parameters
-
array | $values | Initial config values from Env/settings file |
Definition at line 241 of file Config.php.
Elgg\Config::__get |
( |
|
$name | ) |
|
Get an Elgg configuration value if it's been set or loaded during the boot process.
Before ::boot, values from the database will not be present.
- Parameters
-
- Returns
- mixed null if does not exist
Definition at line 452 of file Config.php.
Elgg\Config::__isset |
( |
|
$name | ) |
|
Handle isset()
- Parameters
-
- Returns
- bool
Definition at line 535 of file Config.php.
Elgg\Config::__set |
( |
|
$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 522 of file Config.php.
Elgg\Config::__unset |
( |
|
$name | ) |
|
Handle unset()
- Parameters
-
- Returns
- void
Definition at line 545 of file Config.php.
static Elgg\Config::factory |
( |
|
$settings_path = '' , |
|
|
|
$try_env = true |
|
) |
| |
|
static |
Build a config from default settings locations.
- Parameters
-
string | $settings_path | Path of settings file |
bool | $try_env | If path not given, try $_ENV['ELGG_SETTINGS_FILE'] |
- Returns
- Config
- Exceptions
-
Definition at line 285 of file Config.php.
static Elgg\Config::fromFile |
( |
|
$path, |
|
|
& |
$reason = '' |
|
) |
| |
|
static |
Build a config from a file.
- Parameters
-
string | $path | Path of settings.php |
string | $reason | Returned reason for failure |
- Returns
- bool|Config false on failure
Definition at line 309 of file Config.php.
Elgg\Config::getCookieConfig |
( |
| ) |
|
Set up and return the cookie configuration array resolved from settings.
- Returns
- array
Definition at line 411 of file Config.php.
Elgg\Config::getInitialValue |
( |
|
$name | ) |
|
Get a value set at construction time.
- Parameters
-
- Returns
- mixed null = not set
Definition at line 477 of file Config.php.
Elgg\Config::getValues |
( |
| ) |
|
Get all values.
- Returns
- array
Definition at line 402 of file Config.php.
Elgg\Config::hasInitialValue |
( |
|
$name | ) |
|
Was a value available at construction time? (From settings.php)
- Parameters
-
- Returns
- bool
Definition at line 488 of file Config.php.
Elgg\Config::hasValue |
( |
|
$name | ) |
|
Test if we have a set value.
- Parameters
-
- Returns
- bool
Definition at line 467 of file Config.php.
Elgg\Config::isLocked |
( |
|
$name | ) |
|
Is this value locked?
- Parameters
-
- Returns
- bool
Definition at line 509 of file Config.php.
Elgg\Config::lock |
( |
|
$name | ) |
|
Make a value read-only.
- Parameters
-
- Returns
- void
Definition at line 498 of file Config.php.
Elgg\Config::mergeValues |
( |
array |
$values | ) |
|
Set an array of values.
- Parameters
-
- Returns
- void
Definition at line 391 of file Config.php.
Elgg\Config::remove |
( |
|
$name | ) |
|
Removes a configuration setting from the database.
- Parameters
-
string | $name | Configuration name |
- Returns
- bool
Definition at line 590 of file Config.php.
static Elgg\Config::resolvePath |
( |
|
$settings_path = '' , |
|
|
|
$try_env = true |
|
) |
| |
|
static |
Resolve settings path.
- Parameters
-
string | $settings_path | Path of settings file |
bool | $try_env | If path not given, try $_ENV['ELGG_SETTINGS_FILE'] |
- Returns
- string
Definition at line 373 of file Config.php.
Elgg\Config::save |
( |
|
$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 561 of file Config.php.
Elgg\Config::saveInitialValues |
( |
array |
$values | ) |
|
|
protected |
Stores the inital values.
- Parameters
-
array | $values | The initial values |
- Returns
- void
Definition at line 257 of file Config.php.
Elgg\Config::$config_defaults |
|
protected |
Initial value:= [
'batch_run_time_in_secs' => 4
Definition at line 189 of file Config.php.
const Elgg\Config::ENTITY_TYPES = ['group', 'object', 'site', 'user'] |
The documentation for this class was generated from the following file: