class Config

Class Config

Properties

$config
$session

Methods

__construct()

No description

add_array($configArray, $context = false)

No description

clear(mixed $context, mixed $sub_context = false)

put your comment there.

mixed
delete_setting(string $var, string $context, string $instance_id = false, string $module_name = false, int $group_id = false)

deletes a given var from config db

disable_return_cache()

this will diable the internal config return cache this is usefull if a huge amount of set calls will follow

enable_return_cache()

enable the caching of get config calls this will clear the current cache

enter_install_mode()

No description

array
extract_config_fdl(mixed $config_vars, mixed $default_value)

Private helper that generates the fdl from a given config array.

mixed
get(string $var, bool|string $context = false, bool $force_refresh = false)

No description

array
get_config_fdl($variable, $context)

Returns the config fdl for a regular config field

mixed
get_constant(string $constant)

Accessor for USER constants.

array|bool
get_dyn_config_fdl(mixed $variable, mixed $context, mixed $order_set_name = false, mixed $forced_group_id = false)

Returns the config fdl for a dyn config field

get_dyn_value($variable, $order_set_name = false, $current_context = false, $forced_group_id = false)

No description

mixed|bool
get_explicit(string $var, string $level, bool $user_level = false, null $isset = null)

Get the config setting for the current user of an explicit level (global, [instance_name] or user) If you need the user config for another user than the current, use function 'get_explicit_for_user' instead

mixed
get_explicit_for_user(int $user_id, string $var, string $instance_id = '', null $isset = null)

Get the explicit config setting for a specific user

get_from_session($value)

No description

init()

No description

load_config_set()

No description

load_domain_settings()

No description

load_global_settings()

No description

load_group_settings()

No description

load_instance_settings()

No description

load_user_settings()

No description

register_dyn_config_order($order_set, $order_set_name = false)

register a several context->table pairs to be checked hierarchic for matching config settings in the same order as given in array

register_dyn_variable(string $variable_name, string $variable_type, mixed $additional = false)

register a dynamic variable this is required for being able to generate generic form fields ()

reload_config()

No description

reload_config_set()

No description

reload_user_specific_settings()

reload only the settings different from user tot user

set($var, $value, $context = false, $subcontext = false)

No description

set_dyn_value($variable, $value, $context, $forced_group_id = false)

No description

set_for_request($var, $value, $context = false)

Set flag only for the current request

mixed
set_instance_setting(string $var, string $value, string $instance, string|bool $module_name = false)

No description

set_setting($var, $value, $context, $instance_id = false, $module_name = false, $group_id = false, $merge_mode = 'standard', $merge_order = 0)

No description

Details

at line 37
__construct()

at line 538
add_array($configArray, $context = false)

Parameters

$configArray
$context

at line 423
clear(mixed $context, mixed $sub_context = false)

put your comment there.

..

Parameters

mixed $context
mixed $sub_context

at line 1093
mixed delete_setting(string $var, string $context, string $instance_id = false, string $module_name = false, int $group_id = false)

deletes a given var from config db

Parameters

string $var config var to delete
string $context context to delete from (user, global, group)
string $instance_id instance_id
string $module_name $module_name
int $group_id group_id

Return Value

mixed

at line 152
disable_return_cache()

this will diable the internal config return cache this is usefull if a huge amount of set calls will follow

at line 143
enable_return_cache()

enable the caching of get config calls this will clear the current cache

at line 135
enter_install_mode()

at line 1361
array extract_config_fdl(mixed $config_vars, mixed $default_value)

Private helper that generates the fdl from a given config array.

This is used by both the dyn config and the regular config "get fdl" method.

Parameters

mixed $config_vars The config definition array
mixed $default_value The default value

Return Value

array

at line 373
mixed get(string $var, bool|string $context = false, bool $force_refresh = false)

Parameters

string $var Variable name
bool|string $context Context (e.g. instance name)
bool $force_refresh

Return Value

mixed The config value

at line 1494
array get_config_fdl($variable, $context)

Returns the config fdl for a regular config field

Parameters

$variable
$context

Return Value

array

at line 1585
mixed get_constant(string $constant)

Accessor for USER constants.

Returns a custom (user) defined constant.

Parameters

string $constant

Return Value

mixed

Exceptions

Exception

at line 1522
array|bool get_dyn_config_fdl(mixed $variable, mixed $context, mixed $order_set_name = false, mixed $forced_group_id = false)

Returns the config fdl for a dyn config field

Parameters

mixed $variable
mixed $context
mixed $order_set_name
mixed $forced_group_id

Return Value

array|bool

at line 1244
get_dyn_value($variable, $order_set_name = false, $current_context = false, $forced_group_id = false)

Parameters

$variable
$order_set_name
$current_context
$forced_group_id

at line 450
mixed|bool get_explicit(string $var, string $level, bool $user_level = false, null $isset = null)

Get the config setting for the current user of an explicit level (global, [instance_name] or user) If you need the user config for another user than the current, use function 'get_explicit_for_user' instead

Parameters

string $var
string $level
bool $user_level
null $isset

Return Value

mixed|bool

at line 518
mixed get_explicit_for_user(int $user_id, string $var, string $instance_id = '', null $isset = null)

Get the explicit config setting for a specific user

Parameters

int $user_id User ID
string $var Variable
string $instance_id Empty is global var
null $isset Value was set

Return Value

mixed Value

at line 1073
get_from_session($value)

Parameters

$value

at line 48
init()

at line 792
load_config_set()

at line 985
load_domain_settings()

at line 545
load_global_settings()

at line 630
load_group_settings()

at line 721
load_instance_settings()

at line 580
load_user_settings()

at line 1205
register_dyn_config_order($order_set, $order_set_name = false)

register a several context->table pairs to be checked hierarchic for matching config settings in the same order as given in array

Parameters

$order_set
$order_set_name

at line 1234
register_dyn_variable(string $variable_name, string $variable_type, mixed $additional = false)

register a dynamic variable this is required for being able to generate generic form fields ()

Parameters

string $variable_name
string $variable_type array, value, hook, object, range, enum, set, text, password, bool, tree
mixed $additional label, descriotion, etc.

at line 117
reload_config()

at line 126
reload_config_set()

at line 97
reload_user_specific_settings()

reload only the settings different from user tot user

at line 159
set($var, $value, $context = false, $subcontext = false)

Parameters

$var
$value
$context
$subcontext

at line 1538
set_dyn_value($variable, $value, $context, $forced_group_id = false)

Parameters

$variable
$value
$context
$forced_group_id

at line 197
set_for_request($var, $value, $context = false)

Set flag only for the current request

Parameters

$var
$value
$context

at line 214
mixed set_instance_setting(string $var, string $value, string $instance, string|bool $module_name = false)

Parameters

string $var Variable Name
string $value Variable Value
string $instance Instance ID
string|bool $module_name Module Name

Return Value

mixed

at line 222
set_setting($var, $value, $context, $instance_id = false, $module_name = false, $group_id = false, $merge_mode = 'standard', $merge_order = 0)

Parameters

$var
$value
$context
$instance_id
$module_name
$group_id
$merge_mode
$merge_order