XOOPS  2.6.0
XoopsConfigHandler Class Reference
Inheritance diagram for XoopsConfigHandler:
Inheritance graph

Public Member Functions

 __construct ()
 
 createConfig ()
 
 createConfigOption ()
 
 deleteConfig (XoopsConfigItem $config)
 
 getConfig ($id, $withoptions=false)
 
 getConfigCount (CriteriaElement $criteria=null)
 
 getConfigList ($conf_modid, $conf_catid=0)
 
 getConfigOption ($id)
 
 getConfigOptions (CriteriaElement $criteria=null, $id_as_key=false)
 
 getConfigOptionsCount (CriteriaElement $criteria=null)
 
 getConfigs (CriteriaElement $criteria=null, $id_as_key=false)
 
 getConfigsByCat ($category, $module=0)
 
 getConfigsByModule ($module=0)
 
 insertConfig (XoopsConfigItem $config)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 create ()
 
 delete (XoopsObject $object, $force=true)
 
 get ($int_id)
 
 insert (XoopsObject $object, $force=true)
 

Private Attributes

 $_cachedConfigs = array()
 
 $_cHandler
 
 $_oHandler
 

Additional Inherited Members

- Public Attributes inherited from Xoops\Core\Kernel\XoopsObjectHandler
 $db2
 
- Protected Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 __construct (Connection $db=null)
 

Detailed Description

XOOPS configuration handling class. This class acts as an interface for handling general configurations of XOOPS and its modules.

Author
Kazumi Ono webma.nosp@m.ster.nosp@m.@mywe.nosp@m.b.ne.nosp@m..jp
Todo:
Tests that need to be made:
  • error handling public

Definition at line 35 of file config.php.

Constructor & Destructor Documentation

XoopsConfigHandler::__construct ( )

Constructor

Definition at line 65 of file config.php.

References Xoops\getInstance().

Here is the call graph for this function:

Member Function Documentation

XoopsConfigHandler::createConfig ( )

Create a config

See also
XoopsConfigItem
Returns
XoopsConfigItem XoopsConfigItem

Definition at line 78 of file config.php.

XoopsConfigHandler::createConfigOption ( )

Make a new XoopsConfigOption

Returns
XoopsConfigOption XoopsConfigOption

Definition at line 254 of file config.php.

XoopsConfigHandler::deleteConfig ( XoopsConfigItem  $config)

Delete a config from the database

Parameters
XoopsConfigItem$configXoopsConfigItem
Returns
bool

Definition at line 138 of file config.php.

References $count, $i, $options, getConfigOptions(), XoopsConfigItem\getConfOptions(), and Xoops\Core\Kernel\XoopsObject\getVar().

Here is the call graph for this function:

XoopsConfigHandler::getConfig (   $id,
  $withoptions = false 
)

Get a config

Parameters
int$idID of the config
bool$withoptionsload the config's options now?
Returns
XoopsConfigItem XoopsConfigItem

Definition at line 92 of file config.php.

References $config, $id, and getConfigOptions().

Here is the call graph for this function:

XoopsConfigHandler::getConfigCount ( CriteriaElement  $criteria = null)

Count some configs

Parameters
CriteriaElement | null$criteriaCriteriaElement
Returns
int

Definition at line 191 of file config.php.

References $criteria.

XoopsConfigHandler::getConfigList (   $conf_modid,
  $conf_catid = 0 
)

Get a list of configs

Parameters
int$conf_modidID of the modules
int$conf_catidID of the category
Returns
array Associative array of name=>value pairs.

Definition at line 306 of file config.php.

References $configs, $criteria, and $i.

XoopsConfigHandler::getConfigOption (   $id)

Get a XoopsConfigOption

Parameters
int$idID of the config option
Returns
XoopsConfigOption XoopsConfigOption

Definition at line 267 of file config.php.

References $id.

XoopsConfigHandler::getConfigOptions ( CriteriaElement  $criteria = null,
  $id_as_key = false 
)

Get one or more XoopsConfigOptions

Parameters
CriteriaElement | null$criteriaCriteriaElement
bool$id_as_keyUse IDs as keys in the array?
Returns
array Array of XoopsConfigOptions

Definition at line 281 of file config.php.

References $criteria.

Referenced by deleteConfig(), and getConfig().

Here is the caller graph for this function:

XoopsConfigHandler::getConfigOptionsCount ( CriteriaElement  $criteria = null)

Count some XoopsConfigOptions

Parameters
CriteriaElement | null$criteriaCriteriaElement
Returns
int Count of XoopsConfigOptions matching $criteria

Definition at line 293 of file config.php.

References $criteria.

XoopsConfigHandler::getConfigs ( CriteriaElement  $criteria = null,
  $id_as_key = false 
)

get one or more Configs

Parameters
CriteriaElement | null$criteriaCriteriaElement
bool$id_as_keyUse the configs' ID as keys?
Returns
array Array of XoopsConfigItem objects

Definition at line 168 of file config.php.

References $criteria, and $criteria2.

Referenced by getConfigsByCat(), and getConfigsByModule().

Here is the caller graph for this function:

XoopsConfigHandler::getConfigsByCat (   $category,
  $module = 0 
)

Get configs from a certain category

Parameters
int$categoryID of a category
int$moduleID of a module
Returns
array array of XoopsConfigs
Deprecated:
Use getConfigsByModule instead

Definition at line 227 of file config.php.

References $_cachedConfigs, $configs, $criteria, $i, $module, and getConfigs().

Here is the call graph for this function:

XoopsConfigHandler::getConfigsByModule (   $module = 0)

Get configs from a certain module

Parameters
int$moduleID of a module
Returns
array of XoopsConfigs

Definition at line 203 of file config.php.

References $_cachedConfigs, $configs, $criteria, $i, $module, and getConfigs().

Here is the call graph for this function:

XoopsConfigHandler::insertConfig ( XoopsConfigItem  $config)

insert a new config in the database

Parameters
XoopsConfigItem$configXoopsConfigItem
Returns
bool

Definition at line 109 of file config.php.

References $count, $i, $msg, $options, XoopsConfigItem\getConfOptions(), Xoops\Core\Kernel\XoopsObject\getVar(), and Xoops\Core\Kernel\XoopsObject\setErrors().

Here is the call graph for this function:

Member Data Documentation

XoopsConfigHandler::$_cachedConfigs = array()
private

Definition at line 60 of file config.php.

Referenced by getConfigsByCat(), and getConfigsByModule().

XoopsConfigHandler::$_cHandler
private

Definition at line 43 of file config.php.

XoopsConfigHandler::$_oHandler
private

Definition at line 51 of file config.php.


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