class Gradient extends ConfigObject (View source)

Properties

int $color1 Start color for gradient.
int $color2 Finish color for gradient.
array $x1 Where on the boundary to start in X.
array $y1 Where on the boundary to start in Y.
array $x2 Where on the boundary to finish, relative to $x1.
array $y2 Where on the boundary to finish, relative to $y1.

Methods

mixed
__construct( array $config = array())

Builds the gradient 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.

color1( string $color1)

If present, specifies the start color for the gradient.

color2( string $color2)

If present, specifies the finish color for the gradient.

x1( string $x1)

Sets where on the boundary to start in X.

y1( string $y1)

Sets where on the boundary to start in Y.

x2( string $x2)

Sets where on the boundary to end in X, relative to x1.

y2( string $y2)

Sets where on the boundary to end in Y, relative to y1.

Details

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

Builds the gradient 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 83
Gradient color1( string $color1)

If present, specifies the start color for the gradient.

Parameters

string $color1

Return Value

Gradient

at line 103
Gradient color2( string $color2)

If present, specifies the finish color for the gradient.

Parameters

string $color2

Return Value

Gradient

at line 123
Gradient x1( string $x1)

Sets where on the boundary to start in X.

Parameters

string $x1

Return Value

Gradient

at line 143
Gradient y1( string $y1)

Sets where on the boundary to start in Y.

Parameters

string $y1

Return Value

Gradient

at line 163
Gradient x2( string $x2)

Sets where on the boundary to end in X, relative to x1.

Parameters

string $x2

Return Value

Gradient

at line 183
Gradient y2( string $y2)

Sets where on the boundary to end in Y, relative to y1.

Parameters

string $y2

Return Value

Gradient