The Hubzilla
|
Class for handling observer's config. More...
Static Public Member Functions | |
static | Load ($xchan) |
Loads a full xchan's configuration into a cached storage. More... | |
static | Get ($xchan, $family, $key, $default=false) |
Get a particular observer's config variable given the category name ($family) and a key. More... | |
static | Set ($xchan, $family, $key, $value) |
Sets a configuration value for an observer. More... | |
static | Delete ($xchan, $family, $key) |
Deletes the given key from the observer's config. More... | |
Class for handling observer's config.
XConfig is comparable to PConfig, except that it uses xchan (an observer hash) as an identifier.
XConfig is used for observer specific configurations and takes a xchan as identifier. The storage is of size MEDIUMTEXT.
The old (deprecated?) way to access a XConfig value is:
|
static |
Deletes the given key from the observer's config.
Removes the configured value from the stored cache in App::$config[$xchan] and removes it from the database.
string | $xchan | The observer's hash |
string | $family | The category of the configuration value |
string | $key | The configuration key to delete |
Referenced by del_xconfig(), Zotlabs\Lib\AConfig\Delete(), and Zotlabs\Lib\SConfig\Delete().
|
static |
Get a particular observer's config variable given the category name ($family) and a key.
Get a particular observer's config value from the given category ($family) and the $key from a cached storage in App::$config[$xchan].
Returns false if not set.
string | $xchan | The observer's hash |
string | $family | The category of the configuration value |
string | $key | The configuration key to query |
boolean | $default | (optional) default false |
Referenced by Zotlabs\Lib\AConfig\Get(), Zotlabs\Lib\SConfig\Get(), and get_xconfig().
|
static |
Loads a full xchan's configuration into a cached storage.
All configuration values of the given observer hash are stored in global cache which is available under the global variable App::$config[$xchan].
string | $xchan | The observer's hash |
Referenced by Zotlabs\Lib\AConfig\Load(), Zotlabs\Lib\SConfig\Load(), and load_xconfig().
|
static |
Sets a configuration value for an observer.
Stores a config value ($value) in the category ($family) under the key ($key) for the observer's $xchan hash.
string | $xchan | The observer's hash |
string | $family | The category of the configuration value |
string | $key | The configuration key to set |
string | $value | The value to store |
Referenced by Zotlabs\Lib\AConfig\Set(), Zotlabs\Lib\SConfig\Set(), and set_xconfig().