class Color extends JsonConfig (View source)

Color Object

Calendar charts use a striped diagonal pattern to indicate that there is no data for a particular day. Use this object with backgroundColor and color options to override the grayscale defaults.

Constants

TYPE

Type of JsonConfig object

Methods

__construct( array $config = array())

Builds the Color object with specified options

mixed
__get( string $option)

Get the value of a set option via magic method.

from  JsonConfig
getOptions()

Gets the Options object for the JsonConfig

from  JsonConfig
setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

from  JsonConfig
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

from  JsonConfig
array
jsonSerialize()

Custom serialization of the JsonConfig object.

from  JsonConfig
color( string $fgColor)

Specifies the foreground color.

backgroundColor( string $bgColor)

Specifies the background color.

opacity( float $opacity)

Opacity, with 0.0 being fully transparent and 1.0 fully opaque.

Details

at line 54
__construct( array $config = array())

Builds the Color object with specified options

Parameters

array $config

Exceptions

InvalidConfigValue
InvalidConfigProperty

in JsonConfig at line 64
mixed __get( string $option)

Get the value of a set option via magic method.

Parameters

string $option Name of option.

Return Value

mixed

Exceptions

InvalidConfigProperty

in JsonConfig at line 75
Options getOptions()

Gets the Options object for the JsonConfig

Return Value

Options

in JsonConfig at line 90
JsonConfig setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

In order to maintain backwards compatibility, ConfigObjects will be unwrapped.

Parameters

string $option Option to set.
mixed $value Value of the option.

Return Value

JsonConfig

in JsonConfig at line 106
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

Parameters

array $config

Exceptions

InvalidConfigValue
InvalidConfigProperty

in JsonConfig at line 275
array jsonSerialize()

Custom serialization of the JsonConfig object.

Return Value

array

at line 68
Color color( string $fgColor)

Specifies the foreground color.

Parameters

string $fgColor

Return Value

Color

Exceptions

InvalidConfigValue

at line 80
Color backgroundColor( string $bgColor)

Specifies the background color.

Parameters

string $bgColor

Return Value

Color

Exceptions

InvalidConfigValue

at line 92
Color opacity( float $opacity)

Opacity, with 0.0 being fully transparent and 1.0 fully opaque.

Parameters

float $opacity

Return Value

Color

Exceptions

InvalidConfigValue