PHP Class Pop\Color\Color

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

Protected Properties

Свойство Type Description
$colors array Color space objects

Méthodes publiques

Méthode 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 méthode

Instantiate the color object
public __construct ( Pop\Color\Space\ColorInterface $color ) : Color
$color Pop\Color\Space\ColorInterface
Résultat Color

__get() public méthode

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

__isset() public méthode

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

__unset() public méthode

Unset colors[$name].
public __unset ( string $name ) : void
$name string
Résultat void

addColor() public méthode

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
Résultat Color

factory() public static méthode

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
Résultat Color

Property Details

$colors protected_oe property

Color space objects
protected array $colors
Résultat array