Operations for retrieving and modifying plugin settings. More...
Public Member Functions | |
| & | _buildObject (&$node, $paramArray=array()) |
| _cacheMiss (&$cache, $id) | |
| & | _getCache ($pressId, $pluginName) |
| _performReplacement ($rawInput, $paramArray=array()) | |
| deleteSetting ($pressId, $pluginName, $name) | |
| deleteSettingsByPlugin ($pressId, $pluginName) | |
| deleteSettingsByPressId ($pressId) | |
| & | getPluginSettings ($pressId, $pluginName) |
| getSetting ($pressId, $pluginName, $name) | |
| installSettings ($pressId, $pluginName, $filename, $paramArray=array()) | |
| PluginSettingsDAO () | |
| updateSetting ($pressId, $pluginName, $name, $value, $type=null) | |
Operations for retrieving and modifying plugin settings.
Definition at line 16 of file PluginSettingsDAO.inc.php.
| & PluginSettingsDAO._buildObject | ( | &$ | node, | |
| $ | paramArray = array() | |||
| ) |
Used internally by installSettings to recursively build nested arrays. Deals with translation and variable replacement calls.
| $node | object XMLNode <array> tag | |
| $paramArray | array Parameters to be replaced in key/value contents |
Definition at line 223 of file PluginSettingsDAO.inc.php.
References _performReplacement().
Referenced by installSettings().
| PluginSettingsDAO._cacheMiss | ( | &$ | cache, | |
| $ | id | |||
| ) |
Callback for a cache miss.
| $cache | Cache | |
| $id | string |
Definition at line 70 of file PluginSettingsDAO.inc.php.
References getPluginSettings().
| & PluginSettingsDAO._getCache | ( | $ | pressId, | |
| $ | pluginName | |||
| ) |
Get the cache for plugin settings.
| $pressId | int | |
| $pluginName | string |
Definition at line 30 of file PluginSettingsDAO.inc.php.
Referenced by deleteSetting(), deleteSettingsByPlugin(), getPluginSettings(), getSetting(), and updateSetting().
| PluginSettingsDAO._performReplacement | ( | $ | rawInput, | |
| $ | paramArray = array() | |||
| ) |
Used internally by installSettings to perform variable and translation replacements.
| $rawInput | string contains text including variable and/or translate replacements. | |
| $paramArray | array contains variables for replacement |
Definition at line 209 of file PluginSettingsDAO.inc.php.
Referenced by _buildObject(), and installSettings().
| PluginSettingsDAO.deleteSetting | ( | $ | pressId, | |
| $ | pluginName, | |||
| $ | name | |||
| ) |
Delete a plugin setting.
| $pressId | int | |
| $pluginName | int | |
| $name | string |
Definition at line 162 of file PluginSettingsDAO.inc.php.
References _getCache().
| PluginSettingsDAO.deleteSettingsByPlugin | ( | $ | pressId, | |
| $ | pluginName | |||
| ) |
Delete all settings for a plugin.
| $pressId | int | |
| $pluginName | string |
Definition at line 180 of file PluginSettingsDAO.inc.php.
References _getCache().
| PluginSettingsDAO.deleteSettingsByPressId | ( | $ | pressId | ) |
Delete all settings for a press.
| $pressId | int |
Definition at line 197 of file PluginSettingsDAO.inc.php.
| & PluginSettingsDAO.getPluginSettings | ( | $ | pressId, | |
| $ | pluginName | |||
| ) |
Retrieve and cache all settings for a plugin.
| $pressId | int | |
| $pluginName | string |
Definition at line 88 of file PluginSettingsDAO.inc.php.
References _getCache().
Referenced by _cacheMiss(), and installSettings().
| PluginSettingsDAO.getSetting | ( | $ | pressId, | |
| $ | pluginName, | |||
| $ | name | |||
| ) |
Retrieve a plugin setting value.
| $pluginName | string | |
| $name |
Definition at line 55 of file PluginSettingsDAO.inc.php.
References _getCache().
| PluginSettingsDAO.installSettings | ( | $ | pressId, | |
| $ | pluginName, | |||
| $ | filename, | |||
| $ | paramArray = array() | |||
| ) |
Install plugin settings from an XML file.
| $pluginName | name of plugin for settings to apply to | |
| $filename | string Name of XML file to parse and install | |
| $paramArray | array Optional parameters for variable replacement in settings |
Definition at line 247 of file PluginSettingsDAO.inc.php.
References _buildObject(), _performReplacement(), getPluginSettings(), and updateSetting().
| PluginSettingsDAO.PluginSettingsDAO | ( | ) |
Constructor
Definition at line 20 of file PluginSettingsDAO.inc.php.
| PluginSettingsDAO.updateSetting | ( | $ | pressId, | |
| $ | pluginName, | |||
| $ | name, | |||
| $ | value, | |||
| $ | type = null | |||
| ) |
Add/update a plugin setting.
| $pressId | int | |
| $pluginName | string | |
| $name | string | |
| $value | mixed | |
| $type | string data type of the setting. If omitted, type will be guessed |
Definition at line 119 of file PluginSettingsDAO.inc.php.
References _getCache().
Referenced by installSettings().
1.7.1