Constants

TABLE_SETTINGS

TABLE_SETTINGS

CB_SETTING_CHANGED

CB_SETTING_CHANGED

Properties

Methods

getUsageInformation()

getUsageInformation() 

Gets Information about the Class, and a List of the Public Method

__construct()

__construct(\ManiaControl\ManiaControl  $maniaControl) 

Construct a new setting manager instance

Parameters

\ManiaControl\ManiaControl $maniaControl

handleAfterInit()

handleAfterInit() 

Handle After Init Callback

clearStorage()

clearStorage() 

Clear the Settings Storage

getSettingByIndex()

getSettingByIndex(  $settingIndex,   $defaultValue = null) 

Parameters

$settingIndex
$defaultValue

getSettingValueByIndex()

getSettingValueByIndex(integer  $settingIndex, mixed  $defaultValue = null) : mixed

Get a Setting Value by its Index

Parameters

integer $settingIndex
mixed $defaultValue

Returns

mixed

getSettingObjectByIndex()

getSettingObjectByIndex(integer  $settingIndex) : \ManiaControl\Settings\Setting

Get a Setting Object by its Index

Parameters

integer $settingIndex

Returns

\ManiaControl\Settings\Setting

setSetting()

setSetting(mixed  $object, string  $settingName, mixed  $value) : boolean

Set a Setting for the given Object

Parameters

mixed $object
string $settingName
mixed $value

Returns

boolean

getSettingObject()

getSettingObject(mixed  $object, string  $settingName, mixed  $default = null) : \ManiaControl\Settings\Setting

Get Setting by Name for the given Object

Parameters

mixed $object
string $settingName
mixed $default

Returns

\ManiaControl\Settings\Setting

initSetting()

initSetting(mixed  $object, string  $settingName, mixed  $defaultValue) : boolean

Initialize a Setting for the given Object

Parameters

mixed $object
string $settingName
mixed $defaultValue

Returns

boolean

saveSetting()

saveSetting(\ManiaControl\Settings\Setting  $setting, boolean  $init = false) : boolean

Save the given Setting in the Database

Parameters

\ManiaControl\Settings\Setting $setting
boolean $init

Returns

boolean

getSetting()

getSetting(  $object,   $settingName,   $default = null) 

Parameters

$object
$settingName
$default

getSettingValue()

getSettingValue(mixed  $object, string  $settingName, mixed  $default = null) : mixed

Get the Setting Value directly

Parameters

mixed $object
string $settingName
mixed $default

Returns

mixed

resetSetting()

resetSetting(mixed  $object, string  $settingName = null) : boolean

Reset a Setting to its Default Value

Parameters

mixed $object
string $settingName

Returns

boolean

deleteSetting()

deleteSetting(mixed  $object, string  $settingName = null) : boolean

Delete a Setting

Parameters

mixed $object
string $settingName

Returns

boolean

getSettingsByClass()

getSettingsByClass(mixed  $object) : array<mixed,\ManiaControl\Settings\Setting>

Get all Settings for the given Class

Parameters

mixed $object

Returns

array<mixed,\ManiaControl\Settings\Setting>

getSettingClasses()

getSettingClasses(boolean  $hidePluginClasses = false) : array<mixed,string>

Get all Setting Classes

Parameters

boolean $hidePluginClasses

Returns

array<mixed,string>

initTables()

initTables() : boolean

Initialize the necessary database tables

Returns

boolean

deleteUnusedSettings()

deleteUnusedSettings() : boolean

Delete all unused Settings that haven't been initialized during the current Startup

Returns

boolean

getStoredSetting()

getStoredSetting(mixed  $settingClass, string  $settingName) : \ManiaControl\Settings\Setting

Retrieve a stored Setting

Parameters

mixed $settingClass
string $settingName

Returns

\ManiaControl\Settings\Setting