Methods

Deletes a effective setting.

delete(string $type, string $name) 
Static

Note: The setting will be deleted only from cache, not from persistency layer.

Parameters

$type

string

The type of the item

$name

string

The name of the item

Returns effective setting for a property.

get(string $type, string $name, string $default) : string | bool
Static

The requested setting will be cached at first time, the next time the cached value will be returned.

The order is: System => Client => Client (language) => Group => User

System properties can be overridden by the group, and group properties can be overridden by the user.

Parameters

$type

string

The type of the item

$name

string

The name of the item

$default

string

Optional default value

Returns

stringboolThe setting value or false

Returns effective setting for a type of properties.

getByType(string $type) : array
Static

Caches also the collected settings, but contrary to get() it returns never cached entries.

The order is: System => Client => Client (language) => Group => User

System properties can be overridden by the group, and group properties can be overridden by the user.

Parameters

$type

string

The type of the item

Returns

arrayAssoziative array like $arr[name] = value

Resets all properties of the effective settings class.

reset() 
Static

Usable to start getting settings from scratch.

Sets a effective setting.

set(string $type, string $name, string $value) 
Static

Note: The setting will be set only in cache, not in persistency layer.

Parameters

$type

string

The type of the item

$name

string

The name of the item

$value

string

The value of the setting

Setting getter.

_get(string $key) : string | bool
Static

Parameters

$key

string

The setting key

Returns

stringboolThe setting value or false

Returns the client language object instance.

_getClientInstance() : \cApiClient
Static

Returns

Returns the client language object instance.

_getClientLanguageInstance() : \cApiClientLanguage
Static

Returns the language object instance.

_getLanguageInstance() : \cApiLanguage
Static

Returns

Returns the user object instance.

_getUserInstance() : \cApiUser
Static

Returns

Checks global authentication object and if current user is authenticated.

_isAuthenticated() : bool
Static

Returns

bool

Setting key getter.

_makeKey(string $type, string $name) : string
Static

Parameters

$type

string

The type of the item

$name

string

Name of the item

Returns

stringThe setting key

Setting setter.

_set(string $key, string $value) : string | bool
Static

Parameters

$key

string

The setting key

$value

string

Value to store

Returns

stringboolThe setting value or false

 Properties

 

$_client : \cApiClient
 

$_clientLanguage : \cApiClientLanguage
 

$_language : \cApiLanguage
 

$_settings : array
 

$_user : \cApiUser