Options
class Options implements JsonSerializable (View source)
Options Object
An object that contains a set of options, with methods for extending, removing setting and getting values for these set options.
Methods
Create a new Options object with a set of options.
Returns the array of options that can be set.
Returns an array representation of the options.
Checks to see if a given option is available to set.
Checks to see if a given option is set.
Get the value of a set option.
Batch set options from an array.
Custom serialization of the Options object.
Details
at line 46
__construct(
array $options)
Create a new Options object with a set of options.
at line 64
array
getDefaults()
Returns the array of options that can be set.
at line 75
array
getValues()
Returns an array representation of the options.
at line 87
boolean
hasOption($option)
Checks to see if a given option is available to set.
at line 99
boolean
hasValue($option)
Checks to see if a given option is set.
at line 117
Options
set(
string $option,
mixed $value)
Set the value of an option.
at line 136
mixed
get(
string $option)
Get the value of a set option.
at line 163
Options
setOptions(
array $options,
bool $check = true)
Batch set options from an array.
The check flag can be used to bypass valid option checking (added for the customize chart method ported from the 2.5 branch)
at line 191
Options
merge(
Options $options)
Merges two Options objects and combines the options and values.
at line 206
Options
extend(
array $options)
Extends the default options with more options.
at line 228
Options
remove(
array $options)
Removes options from the default options.
at line 247
array
jsonSerialize()
Custom serialization of the Options object.