Elgg  Version 3.0
Public Member Functions | Protected Attributes | List of all members
Elgg\Database\ConfigTable Class Reference

Manipulates values in the dbprefix_config table. More...

Public Member Functions

 __construct (Database $db, BootService $boot, LoggerInterface $logger)
 Constructor. More...
 
 remove ($name)
 Removes a config setting. More...
 
 set ($name, $value)
 Add or update a config setting. More...
 
 get ($name)
 Gets a configuration value. More...
 
 getAll ()
 Load all config values from the config table. More...
 

Protected Attributes

 $db
 
 $boot
 
 $logger
 

Detailed Description

Manipulates values in the dbprefix_config table.

Do not use to read/write $CONFIG.

WARNING: API IN FLUX. DO NOT USE DIRECTLY.

Definition at line 17 of file ConfigTable.php.

Constructor & Destructor Documentation

Elgg\Database\ConfigTable::__construct ( Database  $db,
BootService  $boot,
LoggerInterface  $logger 
)

Constructor.

Parameters
Database$dbDatabase
BootService$bootBootService
LoggerInterface$loggerLogger

Definition at line 41 of file ConfigTable.php.

Member Function Documentation

Elgg\Database\ConfigTable::get (   $name)

Gets a configuration value.

Plugin authors should use elgg_get_config().

Note
Internal: These settings are stored in the dbprefix_config table and read during system boot into the config service.
Parameters
string$nameThe name of the config value
Returns
mixed|null

Definition at line 128 of file ConfigTable.php.

Elgg\Database\ConfigTable::getAll ( )

Load all config values from the config table.

Returns
array
Exceptions
See also
::__construct sets this

Definition at line 151 of file ConfigTable.php.

Elgg\Database\ConfigTable::remove (   $name)

Removes a config setting.

Parameters
string$nameThe name of the field.
Returns
bool Success or failure

Definition at line 58 of file ConfigTable.php.

Elgg\Database\ConfigTable::set (   $name,
  $value 
)

Add or update a config setting.

Plugin authors should use elgg_save_config().

If the config name already exists, it will be updated to the new value.

Note
Internal: These settings are stored in the dbprefix_config table and read during system boot into the config service.
Internal: The value is serialized so we maintain type information.
Parameters
string$nameThe name of the configuration value
mixed$valueIts value
Returns
bool

Definition at line 90 of file ConfigTable.php.

Member Data Documentation

Elgg\Database\ConfigTable::$boot
protected

Definition at line 27 of file ConfigTable.php.

Elgg\Database\ConfigTable::$db
protected

Definition at line 22 of file ConfigTable.php.

Elgg\Database\ConfigTable::$logger
protected

Definition at line 32 of file ConfigTable.php.


The documentation for this class was generated from the following file: