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

Public Member Functions

_buildLocalizedObject (&$node, $paramArray=array(), $locale=null)
 
_buildObject (&$node, $paramArray=array())
 
 _installer_regexp_callback ($matches)
 
 _performLocalizedReplacement ($rawInput, $paramArray=array(), $locale=null)
 
 _performReplacement ($rawInput, $paramArray=array())
 
 deleteSetting ($journalId, $name, $locale=null)
 
 deleteSettingsByJournal ($journalId)
 
getJournalSettings ($journalId)
 
getSetting ($journalId, $name, $locale=null)
 
 installSettings ($journalId, $filename, $paramArray=array())
 
 reloadLocalizedDefaultSettings ($journalId, $filename, $paramArray, $locale)
 
 updateSetting ($journalId, $name, $value, $type=null, $isLocalized=false)
 
- 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 journal settings.

Definition at line 16 of file JournalSettingsDAO.inc.php.

Member Function Documentation

& JournalSettingsDAO::_buildLocalizedObject ( $node,
  $paramArray = array(),
  $locale = null 
)

Used internally by reloadLocalizedSettingDefaults 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
$localestring contains the name of the locale that should be used for the translation

Definition at line 278 of file JournalSettingsDAO.inc.php.

References _performLocalizedReplacement().

Referenced by reloadLocalizedDefaultSettings().

& JournalSettingsDAO::_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 190 of file JournalSettingsDAO.inc.php.

References _performReplacement().

Referenced by installSettings().

JournalSettingsDAO::_installer_regexp_callback (   $matches)

Used internally by journal setting installation code to perform translation function.

Definition at line 349 of file JournalSettingsDAO.inc.php.

JournalSettingsDAO::_performLocalizedReplacement (   $rawInput,
  $paramArray = array(),
  $locale = null 
)

Used internally by reloadLocalizedSettingDefaults to perform variable and translation replacements.

Parameters
$rawInputstring contains text including variable and/or translate replacements.
$paramArrayarray contains variables for replacement
$localestring contains the name of the locale that should be used for the translation
Returns
string

Definition at line 261 of file JournalSettingsDAO.inc.php.

References AppLocale\requireComponents().

Referenced by _buildLocalizedObject(), and reloadLocalizedDefaultSettings().

JournalSettingsDAO::_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 176 of file JournalSettingsDAO.inc.php.

Referenced by _buildObject(), and installSettings().

JournalSettingsDAO::deleteSetting (   $journalId,
  $name,
  $locale = null 
)

Delete a journal setting.

Parameters
$journalIdint
$namestring

Definition at line 143 of file JournalSettingsDAO.inc.php.

References DAO\update().

JournalSettingsDAO::deleteSettingsByJournal (   $journalId)

Delete all settings for a journal.

Parameters
$journalIdint

Definition at line 161 of file JournalSettingsDAO.inc.php.

References DAO\update().

& JournalSettingsDAO::getJournalSettings (   $journalId)

Retrieve and cache all settings for a journal.

Parameters
$journalIdint
Returns
array

Definition at line 67 of file JournalSettingsDAO.inc.php.

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

& JournalSettingsDAO::getSetting (   $journalId,
  $name,
  $locale = null 
)

Retrieve a journal setting value.

Parameters
$journalIdint
$namestring
$localestring optional
Returns
mixed

Definition at line 39 of file JournalSettingsDAO.inc.php.

JournalSettingsDAO::installSettings (   $journalId,
  $filename,
  $paramArray = array() 
)

Install journal settings from an XML file.

Parameters
$journalIdint ID of journal 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 214 of file JournalSettingsDAO.inc.php.

References _buildObject(), _performReplacement(), AppLocale\getLocale(), and updateSetting().

JournalSettingsDAO::reloadLocalizedDefaultSettings (   $journalId,
  $filename,
  $paramArray,
  $locale 
)

Install locale field Only journal settings from an XML file.

Parameters
$journalIdint ID of journal for settings to apply to
$filenamestring Name of XML file to parse and install
$paramArrayarray Optional parameters for variable replacement in settings
$localestring locale id for which settings will be loaded

Definition at line 303 of file JournalSettingsDAO.inc.php.

References _buildLocalizedObject(), _performLocalizedReplacement(), and updateSetting().

JournalSettingsDAO::updateSetting (   $journalId,
  $name,
  $value,
  $type = null,
  $isLocalized = false 
)

Add/update a journal setting.

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

Definition at line 104 of file JournalSettingsDAO.inc.php.

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

Referenced by installSettings(), and reloadLocalizedDefaultSettings().


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