class Color extends ConfigObject (View source)

Properties

string $color Foreground color.
string $backgroundColor Background color.

Methods

mixed
__construct( array $config = array())

Builds the Color object with specified options

array
toArray( string $keyName = null)

Returns an array representation of the object.

array
getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

color( string $fgColor)

Specifies the foreground color.

backgroundColor( string $bgColor)

Specifies the background color.

Details

at line 46
mixed __construct( array $config = array())

Builds the Color object with specified options

Parameters

array $config Array of options.

Return Value

mixed

Exceptions

InvalidConfigValue
InvalidConfigProperty

in ConfigObject at line 93
array toArray( string $keyName = null)

Returns an array representation of the object.

If passed a label, then the array will be returned with the label as the key.

Called with no label returns an array with the classname as the key.

Parameters

string $keyName Key name to be applied to generated array.

Return Value

array Assoc. array of the options of the object.

in ConfigObject at line 115
array getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

Return Value

array Array of the options of the object.

at line 59
Color color( string $fgColor)

Specifies the foreground color.

Parameters

string $fgColor

Return Value

Color

Exceptions

InvalidConfigValue

at line 81
Color backgroundColor( string $bgColor)

Specifies the background color.

Parameters

string $bgColor

Return Value

Color

Exceptions

InvalidConfigValue