Public Member Functions

PressSettingsDAO Class Reference
[Press]

Operations for retrieving and modifying press settings. More...

List of all members.

Public Member Functions

_buildLocalizedObject (&$node, $paramArray=array(), $locale=null)
_buildObject (&$node, $paramArray=array())
 _cacheMiss (&$cache, $id)
_getCache ($pressId)
 _performLocalizedReplacement ($rawInput, $paramArray=array(), $locale=null)
 _performReplacement ($rawInput, $paramArray=array())
 deleteSetting ($pressId, $name, $locale=null)
 deleteSettingsByPress ($pressId)
getPressSettings ($pressId)
getSetting ($pressId, $name, $locale=null)
 installSettings ($pressId, $filename, $paramArray=array())
 PressSettingsDAO ()
 reloadDefaultSetting ($pressId, $filename, $settingName, $paramArray)
 reloadLocalizedDefaultSettings ($pressId, $filename, $paramArray, $locale)
 updateSetting ($pressId, $name, $value, $type=null, $isLocalized=false)

Detailed Description

Operations for retrieving and modifying press settings.

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


Member Function Documentation

& PressSettingsDAO._buildLocalizedObject ( &$  node,
paramArray = array(),
locale = null 
)

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

Parameters:
$node object XMLNode <array> tag
$paramArray array Parameters to be replaced in key/value contents
$locale string contains the name of the locale that should be used for the translation

Definition at line 298 of file PressSettingsDAO.inc.php.

References _performLocalizedReplacement().

Referenced by reloadLocalizedDefaultSettings().

& PressSettingsDAO._buildObject ( &$  node,
paramArray = array() 
)

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

Parameters:
$node object XMLNode <array> tag
$paramArray array Parameters to be replaced in key/value contents

Definition at line 202 of file PressSettingsDAO.inc.php.

References _performReplacement().

Referenced by installSettings(), and reloadDefaultSetting().

PressSettingsDAO._cacheMiss ( &$  cache,
id 
)

Callback for a cache miss.

Parameters:
$cache Cache
$id string
Returns:
mixed

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

References getPressSettings().

& PressSettingsDAO._getCache ( pressId  ) 

Get the settings cache for a given press ID

Parameters:
$pressId 
Returns:
array

Definition at line 29 of file PressSettingsDAO.inc.php.

Referenced by deleteSetting(), deleteSettingsByPress(), getPressSettings(), getSetting(), and updateSetting().

PressSettingsDAO._performLocalizedReplacement ( rawInput,
paramArray = array(),
locale = null 
)

Used internally by reloadLocalizedSettingDefaults to perform variable and translation replacements.

Parameters:
$rawInput string contains text including variable and/or translate replacements.
$paramArray array contains variables for replacement
$locale string contains the name of the locale that should be used for the translation
Returns:
string

Definition at line 273 of file PressSettingsDAO.inc.php.

Referenced by _buildLocalizedObject(), and reloadLocalizedDefaultSettings().

PressSettingsDAO._performReplacement ( rawInput,
paramArray = array() 
)

Used internally by installSettings to perform variable and translation replacements.

Parameters:
$rawInput string contains text including variable and/or translate replacements.
$paramArray array contains variables for replacement
Returns:
string

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

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

PressSettingsDAO.deleteSetting ( pressId,
name,
locale = null 
)

Delete a press setting.

Parameters:
$pressId int
$name string

Definition at line 155 of file PressSettingsDAO.inc.php.

References _getCache().

PressSettingsDAO.deleteSettingsByPress ( pressId  ) 

Delete all settings for a press.

Parameters:
$pressId int

Definition at line 173 of file PressSettingsDAO.inc.php.

References _getCache().

& PressSettingsDAO.getPressSettings ( pressId  ) 

Retrieve and cache all settings for a press.

Parameters:
$pressId int
Returns:
array

Definition at line 85 of file PressSettingsDAO.inc.php.

References _getCache().

Referenced by _cacheMiss().

& PressSettingsDAO.getSetting ( pressId,
name,
locale = null 
)

Retrieve a press setting value.

Parameters:
$pressId int
$name string
$locale string optional
Returns:
mixed

Definition at line 51 of file PressSettingsDAO.inc.php.

References _getCache().

PressSettingsDAO.installSettings ( pressId,
filename,
paramArray = array() 
)

Install press settings from an XML file.

Parameters:
$pressId int ID of press for settings to apply to
$filename string Name of XML file to parse and install
$paramArray array Optional parameters for variable replacement in settings

Definition at line 226 of file PressSettingsDAO.inc.php.

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

PressSettingsDAO.PressSettingsDAO (  ) 

Constructor

Definition at line 20 of file PressSettingsDAO.inc.php.

PressSettingsDAO.reloadDefaultSetting ( pressId,
filename,
settingName,
paramArray 
)

Reload a default press setting from an XML file.

Parameters:
$pressId int ID of press for settings to apply to
$filename string Name of XML file to parse and install
$settingName string Name of the setting that is to be reloaded
$paramArray array Optional parameters for variable replacement in settings

Definition at line 323 of file PressSettingsDAO.inc.php.

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

PressSettingsDAO.reloadLocalizedDefaultSettings ( pressId,
filename,
paramArray,
locale 
)

Install locale field Only press settings from an XML file.

Parameters:
$pressId int ID of press for settings to apply to
$filename string Name of XML file to parse and install
$paramArray array Optional parameters for variable replacement in settings
$locale string locale id for which settings will be loaded

Definition at line 375 of file PressSettingsDAO.inc.php.

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

PressSettingsDAO.updateSetting ( pressId,
name,
value,
type = null,
isLocalized = false 
)

Add/update a press setting.

Parameters:
$pressId int
$name string
$value mixed
$type string data type of the setting. If omitted, type will be guessed
$isLocalized boolean

Definition at line 116 of file PressSettingsDAO.inc.php.

References _getCache().

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


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