The Hubzilla
|
Class for handling channel specific configurations. More...
Static Public Member Functions | |
static | Load ($uid) |
Loads all configuration values of a channel into a cached storage. More... | |
static | Get ($uid, $family, $key, $default=false) |
Get a particular channel's config variable given the category name ($family) and a key. More... | |
static | Set ($uid, $family, $key, $value) |
Sets a configuration value for a channel. More... | |
static | Delete ($uid, $family, $key) |
Deletes the given key from the channel's configuration. More... | |
Class for handling channel specific configurations.
PConfig is used for channel specific configurations and takes a channel_id as identifier. It stores for example which features are enabled per channel. The storage is of size MEDIUMTEXT.
The old (deprecated?) way to access a PConfig value is:
|
static |
Deletes the given key from the channel's configuration.
Removes the configured value from the stored cache in App::$config[$uid] and removes it from the database.
string | $uid | The channel_id |
string | $family | The category of the configuration value |
string | $key | The configuration key to delete |
Referenced by del_pconfig(), and Zotlabs\Lib\Permcat\delete().
|
static |
Get a particular channel's config variable given the category name ($family) and a key.
Get a particular channel's config value from the given category ($family) and the $key from a cached storage in App::$config[$uid].
Returns false if not set.
string | $uid | The channel_id |
string | $family | The category of the configuration value |
string | $key | The configuration key to query |
mixed | $default | (optional, default false) Default value to return if key does not exist |
Referenced by Zotlabs\Access\PermissionLimits\Get(), and get_pconfig().
|
static |
Loads all configuration values of a channel into a cached storage.
All configuration values of the given channel are stored in global cache which is available under the global variable App::$config[$uid].
string | $uid | The channel_id |
Referenced by Zotlabs\Access\PermissionLimits\Get(), and load_pconfig().
|
static |
Sets a configuration value for a channel.
Stores a config value ($value) in the category ($family) under the key ($key) for the channel_id $uid.
string | $uid | The channel_id |
string | $family | The category of the configuration value |
string | $key | The configuration key to set |
string | $value | The value to store |
Referenced by Zotlabs\Access\PermissionLimits\Set(), set_pconfig(), and Zotlabs\Lib\Permcat\update().