SettingsTrait
This is a class holding convienence methods to access settings from core objects.
Settings exist at the key, link, and context. Link settings are the most common.
Table of Contents
Properties
- $settingsDebugArray : mixed
Methods
- settingsDebug() : mixed
- Retrieve the debug array for the last operation.
- settingsGet() : mixed
- Retrieve a particular key from the settings.
- settingsGetAll() : mixed
- Retrieve an array of all of the settings
- settingsSet() : mixed
- Update a single key in settings
- settingsUpdate() : mixed
- Set or update a number of keys to new values in link settings.
- settingsSetAll() : mixed
- Replace all the settings (Dangerous)
Properties
$settingsDebugArray
public
mixed
$settingsDebugArray
Methods
settingsDebug()
Retrieve the debug array for the last operation.
public
settingsDebug() : mixed
settingsGet()
Retrieve a particular key from the settings.
public
settingsGet(mixed $key[, mixed $default = false ]) : mixed
Returns the value found in settings or false if the key was not found.
If the value is encrypted, it is decrypted using the LTIX::decrypt_secret method.
Parameters
- $key : mixed
-
- The key to get from the settings.
- $default : mixed = false
-
- What to return if the key is not present
settingsGetAll()
Retrieve an array of all of the settings
public
settingsGetAll() : mixed
If there are no settings, return an empty array.
settingsSet()
Update a single key in settings
public
settingsSet(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed
settingsUpdate()
Set or update a number of keys to new values in link settings.
public
settingsUpdate(mixed $keyvals) : mixed
Parameters
- $keyvals : mixed
Tags
settingsSetAll()
Replace all the settings (Dangerous)
protected
settingsSetAll(mixed $new_settings) : mixed
Parameters
- $new_settings : mixed