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

Public Member Functions

_buildObject (&$node, $paramArray=array())
 
 _installer_regexp_callback ($matches)
 
 _performReplacement ($rawInput, $paramArray=array())
 
 deleteSetting ($name, $locale=null)
 
getSetting ($name, $locale=null)
 
getSiteSettings ()
 
 installSettings ($filename, $paramArray=array())
 
 SiteSettingsDAO ()
 
 updateSetting ($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

Class for Site Settings DAO. Operations for retrieving and modifying site settings.

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

Member Function Documentation

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

References _performReplacement().

Referenced by installSettings().

SiteSettingsDAO::_installer_regexp_callback (   $matches)

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

Definition at line 247 of file SiteSettingsDAO.inc.php.

SiteSettingsDAO::_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 168 of file SiteSettingsDAO.inc.php.

Referenced by _buildObject(), and installSettings().

SiteSettingsDAO::deleteSetting (   $name,
  $locale = null 
)

Delete a site setting.

Parameters
$namestring

Definition at line 148 of file SiteSettingsDAO.inc.php.

References DAO\update().

& SiteSettingsDAO::getSetting (   $name,
  $locale = null 
)

Retrieve a site setting value.

Parameters
$namestring
$localestring optional
Returns
mixed

Definition at line 43 of file SiteSettingsDAO.inc.php.

& SiteSettingsDAO::getSiteSettings ( )

Retrieve and cache all settings for a site.

Returns
array

Definition at line 70 of file SiteSettingsDAO.inc.php.

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

SiteSettingsDAO::installSettings (   $filename,
  $paramArray = array() 
)

Install site settings from an XML file.

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

Definition at line 205 of file SiteSettingsDAO.inc.php.

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

SiteSettingsDAO::SiteSettingsDAO ( )

Constructor

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

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

Add/update a site setting.

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

Definition at line 108 of file SiteSettingsDAO.inc.php.

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

Referenced by installSettings().


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