__construct()
__get()
__isset()
__set()
get()
getOptions()
set()
setOptions()
$_options
XenForo options accessor class.
package | XenForo_Options |
---|
__construct(array $options)
Sets up the accessor using the provided options.
array
Collection of options. Keys represent option names.
__get(string $option) : null | mixed
This method cannot be used for getting a sub-option! You must use get() for that.
This is equivalent to calling get() with no sub-option, which means the "main" sub-option will be returned (if applicable).
string
null
mixed
__isset(string $option) : boolean
Do not use this approach for sub-options!
This is equivalent to calling get() with no sub-option, which means the "main" sub-option will be returned (if applicable).
string
boolean
__set(string $name, mixed $value)
Only sets whole options.
string
mixed
get(string $optionName, null | false | string $subOption) : null | mixed
If the option exists and is an array, then... * if no sub-option is specified but an $optionName key exists in the option, return the value for that key * if no sub-option is specified and no $optionName key exists, return the whole option array * if the sub-option === false, the entire option is returned, regardless of what keys exist * if a sub-option is specified and the key exists, return the value for that key * if a sub-option is specified and the key does not exist, return null If the option is not an array, then the value of the option is returned (provided no sub-option is specified). Otherwise, null is returned.
string
Name of the option
null
false
string
Sub-option. See above for usage.
null
mixed
Null if the option doesn't exist (see above) or the option's value.getOptions() : array
array
set(string $option, mixed $subOption, mixed | null $value)
string
mixed
If $value is null, then this is treated as the value; otherwise, a specific array key to change
mixed
null
If null, ignored
setOptions(array $options)
array