Effective setting manager class. Provides a interface to retrieve effective
settings.
Requested effective settings will be cached at first time. Further requests
will return cached settings.
The order to retrieve a effective setting is: System => Client =>
Client (language) => Group => User
- System properties can be overridden by the client
- Client properties can be overridden by client language
- Client language properties can be overridden by group
- Group properties can be overridden by user
Methods summary
public static
string
|
#
get( string $type, string $name, string $default = '' )
Returns effective setting for a property. The requested setting will be
cached at first time, the next time the cached value will be returned.
Returns effective setting for a property. 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 $type The type of the item
- $name
string $name The name of the item
- $default
string $default Optional default value
Returns
string bool setting value or false
|
public static
array
|
#
getByType( string $type )
Returns effective setting for a type of properties. Caches also the collected
settings, but contrary to get() it returns never cached entries.
Returns effective setting for a type of properties. 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 $type The type of the item
Returns
array Assoziative array like $arr[name] = value
|
public static
|
#
set( string $type, string $name, string $value )
Sets a effective setting.
Sets a effective setting.
Note: The setting will be set only in cache, not in persistency layer.
Parameters
- $type
string $type The type of the item
- $name
string $name The name of the item
- $value
string $value The value of the setting
|
public static
|
#
delete( string $type, string $name )
Deletes a effective setting.
Deletes a effective setting.
Note: The setting will be deleted only from cache, not from persistency
layer.
Parameters
- $type
string $type The type of the item
- $name
string $name The name of the item
|
public static
|
#
reset( )
Resets all properties of the effective settings class. Usable to start
getting settings from scratch.
Resets all properties of the effective settings class. Usable to start
getting settings from scratch.
|
protected static
cApiUser
|
#
_getUserInstance( )
Returns the user object instance.
Returns the user object instance.
Returns
|
protected static
cApiClientLanguage
|
|
protected static
cApiLanguage
|
#
_getLanguageInstance( )
Returns the language object instance.
Returns the language object instance.
Returns
|
protected static
cApiClient
|
#
_getClientInstance( )
Returns the client language object instance.
Returns the client language object instance.
Returns
|
protected static
string
|
#
_get( string $key )
Setting getter.
Parameters
- $key
string $key The setting key
Returns
string bool setting value or false
|
protected static
string
|
#
_set( string $key, string $value )
Setting setter.
Parameters
- $key
string $key The setting key
- $value
string $value Value to store
Returns
string bool setting value or false
|
protected static
string
|
#
_makeKey( string $type, string $name )
Setting key getter.
Parameters
- $type
string $type The type of the item
- $name
string $name Name of the item
Returns
string The setting key
|
protected static
boolean
|
#
_isAuthenticated( )
Checks global authentication object and if current user is authenticated.
Checks global authentication object and if current user is authenticated.
Returns
boolean
|