Class: config
Source Location: /system/classes/config.class.php
Class Details
[line 34]
Class Variables
Class Methods
constructor config [line 148]
constructor __construct [line 114]
method add [line 480]
void add(
string
$param_name, mixed
$default_value, string
$type, string
$subgroup, [string
$fieldset = null], [array
$selection_array = null], [int
$sort = 0], [boolean
$set = true], [string
$group = 'Core'], [string
$tab = null])
|
|
Adds a configuration variable to the config object
Parameters:
method del [line 535]
void del(
string
$param_name, string
$group)
|
|
Permanently deletes a parameter
Parameters:
method get_config [line 297]
bool|array &get_config(
string
$group)
|
|
Get configurations for particular group.
Tags:
Parameters:
method get_instance [line 134]
config &get_instance(
string
0)
|
|
This mthod will return an instance of the config class. If an instance with the given group/reference name does not exist, then it will create a new one. This function insures that there is only one instance for a given group name.
Tags:
Parameters:
method get_ui [line 747]
void get_ui(
string
$grp, [
$sg = '0'], [mixed
$change_result = null])
|
|
This function is responsible for creating the configuration GUI
Parameters:
method group_exists [line 322]
bool group_exists(
string
$group)
|
|
Check if group exists or not
Tags:
Parameters:
method initConfig [line 194]
array(string &initConfig(
)
|
|
This method initializes the configuration array (i.e. $_CONF) and will return a reference to the newly created array. The class keeps track of this reference, and the set function will mutate it.
Tags:
method load_baseconfig [line 173]
This method reads the secure configuration file and loads lib-database.php. This needs to be called in the 'Core' group before &init_config() can be used. It only needs to be called once
method restore_param [line 384]
bool restore_param(
string
$name, string
$group, [int
$sg = null], [string
$tab_id = null])
|
|
This method restores the default value (specified in the default_value field) of a configuration variable.
Tags:
Parameters:
method set [line 336]
void set(
string
$name, mixed
$value, [
$group = 'Core'])
|
|
This method sets a configuration variable to a value in the database and in the current array. If the variable does not already exist, nothing will happen.
Parameters:
method set_configfile [line 162]
void set_configfile(
string
$sf)
|
|
This method sets the secure configuration file (database related settings) for the configuration class to read. This should only need to be called for the 'Core' group. It also must be called before load_baseconfig()
Parameters:
method set_default [line 361]
void set_default(
string
$name, mixed
$value, [string
$group = 'Core'])
|
|
This method sets the default of a configuration variable to a value in the database but not in the current array. If the variable does not already exist, nothing will happen.
Parameters:
method unset_param [line 423]
bool unset_param(
string
$name, string
$group, [int
$sg = null], [string
$tab_id = ''])
|
|
This method sets a configuration variable's value to 'unset'.
Tags:
Parameters:
method updateConfig [line 1271]
array(string=>boolean) updateConfig(
array(string=>mixed)
$change_array, string
$group)
|
|
This function takes $_POST input and evaluates it
Tags:
Parameters:
method _DB_escapedQuery [line 1743]
void _DB_escapedQuery(
$sql)
|
|
Helper function: Fix escaped SQL requests for MS SQL, if necessary
Parameters:
method _extract_permissible_conf [line 1375]
void _extract_permissible_conf(
&$change_array, string
$group, [int
$sg_id = null], array(string=>mixed)
$change_array)
|
|
Extracts allowed conf from posted data. Used by updateConfig
Parameters:
method _get_config_features [line 1826]
array _get_config_features(
)
|
|
Get features that has ft_name like 'config%'. Used by lib-common to declare $_CONF_FT
Tags:
method _get_extended [line 549]
array(string _get_extended(
string
$subgroup,
$group)
|
|
Gets extended (GUI related) information from the database
Tags:
Parameters:
method _get_fs_name [line 727]
void _get_fs_name(
string
$tab_id, int
$fs_id)
|
|
Get fieldset name based on sepecified tab id.
Parameters:
method _get_groups [line 650]
Get configuration groups for current logged user. Plugins being disabled are ignored. Configurations that user doesn't access to are ignored.
Tags:
method _get_sgroups [line 684]
array _get_sgroups(
string
$group)
|
|
Get configuration subgroups for particular configuration group.
Tags:
Parameters:
method _get_tab_name [line 713]
void _get_tab_name(
string
$group, int
$tab_id)
|
|
Get tab name based on sepecified group name and tab id.
Parameters:
method _post_configuration [line 605]
voif _post_configuration(
)
|
|
Changes any config settings that depend on other configuration settings. Called by config::initConfig and config::set
method _set_ConfigHelp [line 1764]
void _set_ConfigHelp(
&$t, string
$group, string
$option, string
$t)
|
|
Helper function: Set the URL to the help section for a config option
Parameters:
method _UI_autocomplete_data [line 1655]
string _UI_autocomplete_data(
)
|
|
Build JSON for autocomplete
Tags:
method _UI_configmanager_menu [line 1573]
void _UI_configmanager_menu(
$conf_group
$conf_group, [$sg
$sg = 0])
|
|
Builds configuration menu
Parameters:
method _UI_get_change_block [line 953]
string _UI_get_change_block(
array
$changes, [string
$group = null], [int
$sg = null])
|
|
Get messages to display when changes were made to the configuration.
Tags:
Parameters:
method _UI_get_conf_element [line 1099]
void _UI_get_conf_element(
string
$group, string
$name, string
$display_name, string
$type, string
$val, [mixed
$selectionArray = null], [
$deletable = false], [bool
$allow_reset = false], bool
$deleteable)
|
|
Get a parsed config element based on group $group, name $name, type $type, value to be shown $val and label $display_name to be shown on the left based on language.
Parameters:
method _UI_get_fs [line 1046]
void _UI_get_fs(
string
$group, string
$contents, int
$fs_id,
&$t, object
$t)
|
|
Set fieldset from configuration where fieldset = $fs_id under the group $group with content $contents to template $t
Parameters:
method _UI_get_tab [line 1005]
string _UI_get_tab(
string
$group, string
$contents, int
$tab_id,
&$t, object
$t)
|
|
Set tab from configuration where tab = $tab_id under the group $group with content $contents to template $t
Tags:
Parameters:
method _UI_js_image_spinner [line 1733]
string _UI_js_image_spinner(
)
|
|
Set image spinner path in javascript variable
Tags:
method _UI_perm_denied [line 1072]
string _UI_perm_denied(
)
|
|
Returns a page for permission denied
Tags:
method _validates [line 1482]
boolean _validates(
string
$config, string
$group,
&$value, [
&$relatedValue = null], mixed
$value, mixed
$relatedValue)
|
|
Returns true if configuration field pass given validation rule.
Tags:
Parameters:
method _validate_input [line 1398]
mixed _validate_input(
mixed
$config,
$group,
&$input_val)
|
|
Input validation
Parameters:
method _validate_numeric [line 1446]
boolean _validate_numeric(
string
$config, string
$group)
|
|
Returns true if configuration field should be numeric.
Tags:
Parameters:
|
|