Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PluginSettingsDAO Class Reference
Inheritance diagram for PluginSettingsDAO:
DAO

Public Member Functions

_buildObject (&$node, $paramArray=array())
 
 _performReplacement ($rawInput, $paramArray=array())
 
 deleteSetting ($journalId, $pluginName, $name)
 
 deleteSettingsByJournalId ($journalId)
 
 deleteSettingsByPlugin ($pluginName, $journalId=null)
 
getPluginSettings ($journalId, $pluginName)
 
 getSetting ($journalId, $pluginName, $name)
 
 installSettings ($journalId, $pluginName, $filename, $paramArray=array())
 
 updateSetting ($journalId, $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 ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 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

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying plugin settings.

See Also
Plugin

Definition at line 18 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 218 of file PluginSettingsDAO.inc.php.

References _performReplacement().

Referenced by installSettings().

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 204 of file PluginSettingsDAO.inc.php.

Referenced by _buildObject(), and installSettings().

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

Delete a plugin setting.

Parameters
$journalIdint
$pluginNameint
$namestring

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

References DAO\update().

PluginSettingsDAO::deleteSettingsByJournalId (   $journalId)

Delete all settings for a journal.

Parameters
$journalIdint

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

References DAO\update().

PluginSettingsDAO::deleteSettingsByPlugin (   $pluginName,
  $journalId = null 
)

Delete all settings for a plugin.

Parameters
$journalIdint
$pluginNamestring

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

References DAO\update().

& PluginSettingsDAO::getPluginSettings (   $journalId,
  $pluginName 
)

Retrieve and cache all settings for a plugin.

Parameters
$journalIdint
$pluginNamestring
Returns
array

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

References DAO\convertFromDB(), and DAO\retrieve().

Referenced by installSettings().

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

Retrieve a plugin setting value.

Parameters
$pluginNamestring
$name
Returns
mixed

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

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

Install plugin settings from an XML file.

Parameters
$journalIdint
$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 243 of file PluginSettingsDAO.inc.php.

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

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

Add/update a plugin setting.

Parameters
$journalIdint
$pluginNamestring
$namestring
$valuemixed
$typestring data type of the setting. If omitted, type will be guessed

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

References DAO\convertToDB(), DAO\retrieve(), and DAO\update().

Referenced by installSettings().


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