PHP Class Pop\Color\Color

Author: Nick Sagona, III ([email protected])
Mostra file Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$colors array Color space objects

Public Methods

Method Description
__construct ( Pop\Color\Space\ColorInterface $color ) : Color Constructor
__get ( string $name ) : mixed Get method to return the value of colors[$name].
__isset ( string $name ) : boolean Return the isset value of colors[$name].
__unset ( string $name ) : void Unset colors[$name].
addColor ( Pop\Color\Space\ColorInterface $color ) : Color Method to add a new color space object to the color object.
factory ( Pop\Color\Space\ColorInterface $color ) : Color Static method to instantiate the color object and return itself to facilitate chaining methods together.

Method Details

__construct() public method

Instantiate the color object
public __construct ( Pop\Color\Space\ColorInterface $color ) : Color
$color Pop\Color\Space\ColorInterface
return Color

__get() public method

Get method to return the value of colors[$name].
public __get ( string $name ) : mixed
$name string
return mixed

__isset() public method

Return the isset value of colors[$name].
public __isset ( string $name ) : boolean
$name string
return boolean

__unset() public method

Unset colors[$name].
public __unset ( string $name ) : void
$name string
return void

addColor() public method

Method to add a new color space object to the color object.
public addColor ( Pop\Color\Space\ColorInterface $color ) : Color
$color Pop\Color\Space\ColorInterface
return Color

factory() public static method

Static method to instantiate the color object and return itself to facilitate chaining methods together.
public static factory ( Pop\Color\Space\ColorInterface $color ) : Color
$color Pop\Color\Space\ColorInterface
return Color

Property Details

$colors protected_oe property

Color space objects
protected array $colors
return array