XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsConfigHandler Class Reference

Public Member Functions

 __construct (&$db)
 
createConfig ()
 
getConfig ($id, $withoptions=false)
 
 insertConfig (&$config)
 
 deleteConfig (&$config)
 
getConfigs ($criteria=null, $id_as_key=false, $with_options=false)
 
 getConfigCount ($criteria=null)
 
getConfigsByCat ($category, $module=0)
 
getConfigsByDirname ($dirname, $category=0)
 
createConfigOption ()
 
getConfigOption ($id)
 
getConfigOptions ($criteria=null, $id_as_key=false)
 
 getConfigOptionsCount ($criteria=null)
 
getConfigList ($conf_modid, $conf_catid=0)
 

Data Fields

 $_cHandler
 
 $_oHandler
 
 $_cachedConfigs = []
 

Detailed Description

Definition at line 25 of file config.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( & $db)

Constructor

Parameters
object&$dbreference to database object

Definition at line 58 of file config.php.

Member Function Documentation

◆ createConfig()

& createConfig ( )

Create a config

See also
XoopsConfigItem
Returns
object reference to the new XoopsConfigItem

Definition at line 70 of file config.php.

◆ createConfigOption()

& createConfigOption ( )

Make a new XoopsConfigOption

Returns
object XoopsConfigOption

Definition at line 244 of file config.php.

◆ deleteConfig()

deleteConfig ( & $config)

Delete a config from the database

Parameters
object&$configreference to a XoopsConfigItem
Returns
bool

Definition at line 124 of file config.php.

◆ getConfig()

& getConfig ( $id,
$withoptions = false )

Get a config

Parameters
int$idID of the config
bool$withoptionsload the config's options now?
Returns
object reference to the XoopsConfig

Definition at line 83 of file config.php.

◆ getConfigCount()

getConfigCount ( $criteria = null)

Count some configs

Parameters
object$criteriaCriteriaElement
Returns
int

Definition at line 167 of file config.php.

◆ getConfigList()

& 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 297 of file config.php.

◆ getConfigOption()

& getConfigOption ( $id)

Get a XoopsConfigOption

Parameters
int$idID of the config option
Returns
object XoopsConfigOption

Definition at line 257 of file config.php.

◆ getConfigOptions()

& getConfigOptions ( $criteria = null,
$id_as_key = false )

Get one or more XoopsConfigOptions

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

Definition at line 271 of file config.php.

◆ getConfigOptionsCount()

getConfigOptionsCount ( $criteria = null)

Count some XoopsConfigOptions

Parameters
object$criteriaCriteriaElement
Returns
int Count of XoopsConfigOptions matching $criteria

Definition at line 284 of file config.php.

◆ getConfigs()

& getConfigs ( $criteria = null,
$id_as_key = false,
$with_options = false )

get one or more Configs

Parameters
object$criteriaCriteriaElement
bool$id_as_keyUse the configs' ID as keys?
bool$with_optionsget the options now?
Returns
array Array of XoopsConfigItem objects

Definition at line 155 of file config.php.

◆ getConfigsByCat()

& 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
Todo
This method keeps cache for categories. This may be problem...

Definition at line 181 of file config.php.

◆ getConfigsByDirname()

& getConfigsByDirname ( $dirname,
$category = 0 )

Get configs by dirname.

Parameters
string$dirname
int$categoryID of a category. (Reserved)
Returns
array|null

Definition at line 223 of file config.php.

◆ insertConfig()

insertConfig ( & $config)

insert a new config in the database

Parameters
object&$configreference to the XoopsConfigItem
Returns
bool

Definition at line 98 of file config.php.

Field Documentation

◆ $_cachedConfigs

$_cachedConfigs = []

Definition at line 51 of file config.php.

◆ $_cHandler

$_cHandler

Definition at line 34 of file config.php.

◆ $_oHandler

$_oHandler

Definition at line 42 of file config.php.


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