ClientConfig
in package
Table of Contents
Constants
- DEFAULTS = ['session_timeout' => 36000, 'block_tracking_header_name' => "", 'block_tracking_header_value' => "", 'collect_location' => false, 'allowed_origins' => '*', 'reinit_timeout' => 300]
- Default values for settings
- PROTECTED_SETTINGS = ['session_timeout']
- Settings that cannot be overwritten through the constructor
- VALIDATION_RULES = ['session_timeout' => [ 'type' => 'integer', 'min' => 3600, // Minimum 1 hour 'max' => 2592000, ], 'block_tracking_header_name' => ['type' => 'string'], 'block_tracking_header_value' => ['type' => 'string'], 'collect_location' => ['type' => 'boolean'], 'allowed_origins' => ['type' => 'string'], 'reinit_timeout' => [ 'type' => 'integer', 'min' => 60, // Minimum 1 minute 'max' => 86400, ]]
- Validation rules for settings
Properties
- $sdkSettings : array<string|int, mixed>
- $settings : array<string|int, mixed>
- $storage : StorageFacadeInterface
Methods
- __construct() : mixed
- get() : mixed
- Get a specific setting value
- getAll() : array<string|int, mixed>
- Get all settings
- rebuildSettings() : mixed
- Rebuild the settings from the storage and the sdk settings
- validateSettings() : mixed
- Validate all settings against the defined rules
Constants
DEFAULTS
Default values for settings
public
mixed
DEFAULTS
= ['session_timeout' => 36000, 'block_tracking_header_name' => "", 'block_tracking_header_value' => "", 'collect_location' => false, 'allowed_origins' => '*', 'reinit_timeout' => 300]
PROTECTED_SETTINGS
Settings that cannot be overwritten through the constructor
public
mixed
PROTECTED_SETTINGS
= ['session_timeout']
VALIDATION_RULES
Validation rules for settings
public
mixed
VALIDATION_RULES
= ['session_timeout' => [
'type' => 'integer',
'min' => 3600,
// Minimum 1 hour
'max' => 2592000,
], 'block_tracking_header_name' => ['type' => 'string'], 'block_tracking_header_value' => ['type' => 'string'], 'collect_location' => ['type' => 'boolean'], 'allowed_origins' => ['type' => 'string'], 'reinit_timeout' => [
'type' => 'integer',
'min' => 60,
// Minimum 1 minute
'max' => 86400,
]]
Properties
$sdkSettings
private
array<string|int, mixed>
$sdkSettings
$settings
private
array<string|int, mixed>
$settings
$storage
private
StorageFacadeInterface
$storage
Methods
__construct()
public
__construct(StorageFacadeInterface $storage[, array<string|int, mixed> $settings = [] ]) : mixed
Parameters
- $storage : StorageFacadeInterface
- $settings : array<string|int, mixed> = []
Tags
get()
Get a specific setting value
public
get(string $key) : mixed
Parameters
- $key : string
Tags
getAll()
Get all settings
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>rebuildSettings()
Rebuild the settings from the storage and the sdk settings
public
rebuildSettings() : mixed
Tags
validateSettings()
Validate all settings against the defined rules
private
validateSettings() : mixed