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

Public Member Functions

_buildLocalizedObject (&$node, $paramArray=array(), $locale=null)
 
 _buildObject (&$node, $paramArray=array())
 
 _cacheMiss ($cache, $id)
 
 _getCache ($id)
 
 _installer_regexp_callback ($matches)
 
 _performLocalizedReplacement ($rawInput, $paramArray=array(), $locale=null)
 
 _performReplacement ($rawInput, $paramArray=array())
 
 deleteById ($id)
 
 deleteSetting ($id, $name, $locale=null)
 
getSetting ($id, $name, $locale=null)
 
getSettings ($id)
 
 installSettings ($id, $filename, $paramArray=array())
 
 reloadDefaultSetting ($id, $filename, $settingName, $paramArray)
 
 reloadLocalizedDefaultSettings ($id, $filename, $paramArray, $locale)
 
 SettingsDAO ()
 
 updateSetting ($id, $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 ()
 
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)
 

Protected Member Functions

 _getCacheName ()
 
 _getPrimaryKeyColumn ()
 
 _getTableName ()
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Additional Inherited Members

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

Detailed Description

Operations for retrieving and modifying settings.

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

Member Function Documentation

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

References _performLocalizedReplacement().

Referenced by reloadLocalizedDefaultSettings().

SettingsDAO::_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 109 of file SettingsDAO.inc.php.

References _performReplacement().

Referenced by installSettings(), and reloadDefaultSetting().

SettingsDAO::_cacheMiss (   $cache,
  $id 
)

Callback for a cache miss.

Parameters
$cacheCache
$idstring
Returns
mixed

Definition at line 80 of file SettingsDAO.inc.php.

References getSettings().

SettingsDAO::_getCache (   $id)

Get the settings cache for a given ID

Parameters
$id
Returns
array

Definition at line 412 of file SettingsDAO.inc.php.

References _getCacheName().

Referenced by deleteById(), deleteSetting(), getSetting(), getSettings(), and updateSetting().

SettingsDAO::_getCacheName ( )
protected

Get the cache name.

Definition at line 445 of file SettingsDAO.inc.php.

Referenced by _getCache().

SettingsDAO::_getPrimaryKeyColumn ( )
protected

Get the primary key column name.

Definition at line 438 of file SettingsDAO.inc.php.

Referenced by deleteById(), deleteSetting(), getSettings(), and updateSetting().

SettingsDAO::_getTableName ( )
protected

Get the settings table name.

Returns
string

Definition at line 431 of file SettingsDAO.inc.php.

Referenced by deleteById(), deleteSetting(), getSettings(), and updateSetting().

SettingsDAO::_installer_regexp_callback (   $matches)

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

Definition at line 176 of file SettingsDAO.inc.php.

SettingsDAO::_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 262 of file SettingsDAO.inc.php.

Referenced by _buildLocalizedObject(), and reloadLocalizedDefaultSettings().

SettingsDAO::_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 95 of file SettingsDAO.inc.php.

Referenced by _buildObject(), installSettings(), and reloadDefaultSetting().

SettingsDAO::deleteById (   $id)

Delete all settings for an ID.

Parameters
$idint

Definition at line 245 of file SettingsDAO.inc.php.

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

SettingsDAO::deleteSetting (   $id,
  $name,
  $locale = null 
)

Delete a setting.

Parameters
$idint
$namestring

Definition at line 227 of file SettingsDAO.inc.php.

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

& SettingsDAO::getSetting (   $id,
  $name,
  $locale = null 
)

Retrieve a setting value.

Parameters
$idint
$namestring
$localestring optional
Returns
mixed

Definition at line 60 of file SettingsDAO.inc.php.

References _getCache().

& SettingsDAO::getSettings (   $id)

Retrieve and cache all settings.

Parameters
$idint
Returns
array

Definition at line 30 of file SettingsDAO.inc.php.

References _getCache(), _getPrimaryKeyColumn(), _getTableName(), DAO\convertFromDB(), and DAO\retrieve().

Referenced by _cacheMiss().

SettingsDAO::installSettings (   $id,
  $filename,
  $paramArray = array() 
)

Install conference settings from an XML file.

Parameters
$idint ID of scheduled conference/conference 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 133 of file SettingsDAO.inc.php.

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

SettingsDAO::reloadDefaultSetting (   $id,
  $filename,
  $settingName,
  $paramArray 
)

Reload a default setting from an XML file.

Parameters
$idint ID for settings to apply to
$filenamestring Name of XML file to parse and install
$settingNamestring Name of the setting that is to be reloaded
$paramArrayarray Optional parameters for variable replacement in settings

Definition at line 312 of file SettingsDAO.inc.php.

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

SettingsDAO::reloadLocalizedDefaultSettings (   $id,
  $filename,
  $paramArray,
  $locale 
)

Install locale field only settings from an XML file.

Parameters
$idint ID 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 364 of file SettingsDAO.inc.php.

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

SettingsDAO::SettingsDAO ( )

Constructor.

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

SettingsDAO::updateSetting (   $id,
  $name,
  $value,
  $type = null,
  $isLocalized = false 
)

Add/update a setting.

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

Definition at line 188 of file SettingsDAO.inc.php.

References _getCache(), _getPrimaryKeyColumn(), _getTableName(), DAO\convertToDB(), DAO\replace(), and DAO\update().

Referenced by installSettings(), reloadDefaultSetting(), and reloadLocalizedDefaultSettings().


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