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, Core|null $instance = null)

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(mixed $variable, mixed $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

bool
is_install_mode()

No description

leave_install_mode()

Leaves the install mode by setting install mode property to false.

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(mixed $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 38
__construct()

No description

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

No description

Parameters

$configArray
$context

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

put your comment there.

..

Parameters

mixed $context
mixed $sub_context

at line 1090
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 167
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 158
enable_return_cache()

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

at line 136
enter_install_mode()

No description

at line 1347
array extract_config_fdl(mixed $config_vars, mixed $default_value, Core|null $instance = null)

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

Core|null $instance

The instance of the config value used to translate labels and descriptions

Return Value

array

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

No description

Parameters

string $var

Variable name

bool|string $context

Context (e.g. instance name)

bool $force_refresh

Return Value

mixed

The config value

at line 1478
array get_config_fdl(mixed $variable, mixed $context)

Returns the config fdl for a regular config field

Parameters

mixed $variable
mixed $context

Return Value

array

at line 1572
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 1509
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 1229
get_dyn_value($variable, $order_set_name = false, $current_context = false, $forced_group_id = false)

No description

Parameters

$variable
$order_set_name
$current_context
$forced_group_id

at line 447
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 515
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 1070
get_from_session($value)

No description

Parameters

$value

at line 49
init()

No description

at line 150
bool is_install_mode()

No description

Return Value

bool

Returns true if the install mode is enabled on the configuration

at line 143
leave_install_mode()

Leaves the install mode by setting install mode property to false.

at line 789
load_config_set()

No description

at line 982
load_domain_settings()

No description

at line 542
load_global_settings()

No description

at line 627
load_group_settings()

No description

at line 718
load_instance_settings()

No description

at line 577
load_user_settings()

No description

at line 1190
register_dyn_config_order(mixed $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

mixed $order_set

array of the form array('context'=>array('table'=>'xmi_instance_config', 'group_context'=>2 'context2'=>'xmi_instance2_config') // context2 then has group_id 0

$order_set_name

at line 1219
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 118
reload_config()

No description

at line 127
reload_config_set()

No description

at line 98
reload_user_specific_settings()

reload only the settings different from user tot user

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

No description

Parameters

$var
$value
$context
$subcontext

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

No description

Parameters

$variable
$value
$context
$forced_group_id

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

Set flag only for the current request

Parameters

$var
$value
$context

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

No description

Parameters

string $var

Variable Name

string $value

Variable Value

string $instance

Instance ID

string|bool $module_name

Module Name

Return Value

mixed

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

No description

Parameters

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