Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PluginSettingsDAO Class Reference
Inheritance diagram for PluginSettingsDAO:
DAO

Public Member Functions

 _buildObject ($node, $paramArray=array())
 
 _cacheMiss ($cache, $id)
 
 _getCache ($contextId, $pluginName)
 
 _performReplacement ($rawInput, $paramArray=array())
 
 deleteByContextId ($contextId)
 
 deleteSetting ($contextId, $pluginName, $name)
 
 deleteSettingsByPlugin ($contextId, $pluginName)
 
 getPluginSettings ($contextId, $pluginName)
 
 getSetting ($contextId, $pluginName, $name)
 
 installSettings ($contextId, $pluginName, $filename, $paramArray=array())
 
 PluginSettingsDAO ()
 
 updateSetting ($contextId, $pluginName, $name, $value, $type=null)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying plugin settings.

See Also
Plugin

Definition at line 17 of file PluginSettingsDAO.inc.php.

Member Function Documentation

PluginSettingsDAO::_buildObject (   $node,
  $paramArray = array() 
)

Used internally by installSettings to recursively build nested arrays. Deals with translation and variable replacement calls.

Parameters
$nodeobject XMLNode <array> tag
$paramArrayarray Parameters to be replaced in key/value contents

Definition at line 211 of file PluginSettingsDAO.inc.php.

References _performReplacement().

Referenced by installSettings().

PluginSettingsDAO::_cacheMiss (   $cache,
  $id 
)

Callback for a cache miss.

Parameters
$cacheCache object
$idstring Identifier to look up in cache
Returns
mixed

Definition at line 72 of file PluginSettingsDAO.inc.php.

References getPluginSettings().

PluginSettingsDAO::_getCache (   $contextId,
  $pluginName 
)

Get the cache for plugin settings.

Parameters
$contextIdint Context ID
$pluginNamestring Plugin symbolic name
Returns
Cache

Definition at line 31 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.

Parameters
$rawInputstring contains text including variable and/or translate replacements.
$paramArrayarray contains variables for replacement
Returns
string

Definition at line 197 of file PluginSettingsDAO.inc.php.

Referenced by _buildObject(), and installSettings().

PluginSettingsDAO::deleteByContextId (   $contextId)

Delete all settings for a context.

Parameters
$contextIdint

Definition at line 185 of file PluginSettingsDAO.inc.php.

References DAO\update().

PluginSettingsDAO::deleteSetting (   $contextId,
  $pluginName,
  $name 
)

Delete a plugin setting.

Parameters
$contextIdint
$pluginNameint
$namestring

Definition at line 150 of file PluginSettingsDAO.inc.php.

References _getCache(), and DAO\update().

PluginSettingsDAO::deleteSettingsByPlugin (   $contextId,
  $pluginName 
)

Delete all settings for a plugin.

Parameters
$contextIdint
$pluginNamestring

Definition at line 168 of file PluginSettingsDAO.inc.php.

References _getCache(), and DAO\update().

PluginSettingsDAO::getPluginSettings (   $contextId,
  $pluginName 
)

Retrieve and cache all settings for a plugin.

Parameters
$contextIdint Context ID
$pluginNamestring Plugin symbolic name
Returns
array

Definition at line 90 of file PluginSettingsDAO.inc.php.

References _getCache(), DAO\convertFromDB(), Application\getPluginSettingsContextColumnName(), and DAO\retrieve().

Referenced by _cacheMiss(), and installSettings().

PluginSettingsDAO::getSetting (   $contextId,
  $pluginName,
  $name 
)

Retrieve a plugin setting value.

Parameters
$contextIdint Context ID
$pluginNamestring Plugin symbolic name
$nameSetting name
Returns
mixed

Definition at line 57 of file PluginSettingsDAO.inc.php.

References _getCache().

PluginSettingsDAO::installSettings (   $contextId,
  $pluginName,
  $filename,
  $paramArray = array() 
)

Install plugin settings from an XML file.

Parameters
$pluginNamename of plugin for settings to apply to
$filenamestring Name of XML file to parse and install
$paramArrayarray Optional parameters for variable replacement in settings

Definition at line 235 of file PluginSettingsDAO.inc.php.

References _buildObject(), _performReplacement(), getPluginSettings(), and updateSetting().

PluginSettingsDAO::PluginSettingsDAO ( )

Constructor

Definition at line 21 of file PluginSettingsDAO.inc.php.

PluginSettingsDAO::updateSetting (   $contextId,
  $pluginName,
  $name,
  $value,
  $type = null 
)

Add/update a plugin setting.

Parameters
$contextIdint Context ID
$pluginNamestring Symbolic plugin name
$namestring Setting name
$valuemixed Setting value
$typestring data type of the setting. If omitted, type will be guessed
Returns
int Return value from ADODB's replace() function.

Definition at line 122 of file PluginSettingsDAO.inc.php.

References _getCache(), DAO\convertToDB(), and DAO\replace().

Referenced by installSettings().


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