PHP Class Phue\Group

Inheritance: implements phue\LightInterface
Afficher le fichier Open project: sqmk/phue

Protected Properties

Свойство Type Description
$attributes stdClass Group attributes
$client Client Phue client
$id integer Id

Méthodes publiques

Méthode Description
__construct ( integer $id, stdClass $attributes, Client $client ) Construct a Phue Group object
__toString ( ) : string __toString
delete ( ) Delete group
getAlert ( ) : string Get alert
getBrightness ( ) : integer Get brightness
getColorMode ( ) : string Get color mode of group
getColorTemp ( ) : integer Get Color temperature
getEffect ( ) : string Get effect mode
getHue ( ) : integer Get hue
getId ( ) : integer Get group Id
getLightIds ( ) : array Get light ids
getName ( ) : string Get assigned name of Group
getRGB ( ) : array Get calculated RGB
getSaturation ( ) : integer Get saturation
getType ( ) : string Get type
getXY ( ) : array Get XY
isOn ( ) : boolean Is the group on?
setAlert ( string $mode = SetLightState::ALERT_LONG_SELECT ) : self Set light alert
setBrightness ( integer $level = SetLightState::BRIGHTNESS_MAX ) : self Set brightness
setColorTemp ( integer $value ) : self Set Color temperature
setEffect ( string $mode = SetLightState::EFFECT_NONE ) : self Set effect
setHue ( integer $value ) : self Set hue
setLights ( array $lights ) : self Set lights
setName ( string $name ) : self Set name of group
setOn ( boolean $flag = true ) : self Set group lights on/off
setRGB ( integer $red, integer $green, integer $blue ) : self Set XY and brightness calculated from RGB
setSaturation ( integer $value ) : self Set saturation
setScene ( mixed $scene ) : self Set scene on group
setXY ( float $x, float $y ) : self Set XY

Method Details

__construct() public méthode

Construct a Phue Group object
public __construct ( integer $id, stdClass $attributes, Client $client )
$id integer Id
$attributes stdClass Group attributes
$client Client Phue client

__toString() public méthode

__toString
public __toString ( ) : string
Résultat string Group Id

delete() public méthode

Delete group
public delete ( )

getAlert() public méthode

Get alert
public getAlert ( ) : string
Résultat string Alert mode

getBrightness() public méthode

Get brightness
public getBrightness ( ) : integer
Résultat integer Brightness level

getColorMode() public méthode

Get color mode of group
public getColorMode ( ) : string
Résultat string Color mode

getColorTemp() public méthode

Get Color temperature
public getColorTemp ( ) : integer
Résultat integer Color temperature value

getEffect() public méthode

Get effect mode
public getEffect ( ) : string
Résultat string effect mode

getHue() public méthode

Get hue
public getHue ( ) : integer
Résultat integer Hue value

getId() public méthode

Get group Id
public getId ( ) : integer
Résultat integer Group id

getLightIds() public méthode

Get light ids
public getLightIds ( ) : array
Résultat array List of light ids

getName() public méthode

Get assigned name of Group
public getName ( ) : string
Résultat string Name of Group

getRGB() public méthode

Get calculated RGB
public getRGB ( ) : array
Résultat array red, green, blue key/value

getSaturation() public méthode

Get saturation
public getSaturation ( ) : integer
Résultat integer Saturation value

getType() public méthode

Get type
public getType ( ) : string
Résultat string Group type

getXY() public méthode

Get XY
public getXY ( ) : array
Résultat array X, Y key/value

isOn() public méthode

Is the group on?
public isOn ( ) : boolean
Résultat boolean True if on, false if not

setAlert() public méthode

Set light alert
public setAlert ( string $mode = SetLightState::ALERT_LONG_SELECT ) : self
$mode string Alert mode
Résultat self This object

setBrightness() public méthode

Set brightness
public setBrightness ( integer $level = SetLightState::BRIGHTNESS_MAX ) : self
$level integer Brightness level
Résultat self This object

setColorTemp() public méthode

Set Color temperature
public setColorTemp ( integer $value ) : self
$value integer Color temperature value
Résultat self This object

setEffect() public méthode

Set effect
public setEffect ( string $mode = SetLightState::EFFECT_NONE ) : self
$mode string Effect mode
Résultat self This object

setHue() public méthode

Set hue
public setHue ( integer $value ) : self
$value integer Group value
Résultat self This object

setLights() public méthode

Set lights
public setLights ( array $lights ) : self
$lights array Light ids or Light objects
Résultat self This object

setName() public méthode

Set name of group
public setName ( string $name ) : self
$name string
Résultat self This object

setOn() public méthode

Set group lights on/off
public setOn ( boolean $flag = true ) : self
$flag boolean True for on, false for off
Résultat self This object

setRGB() public méthode

Set XY and brightness calculated from RGB
public setRGB ( integer $red, integer $green, integer $blue ) : self
$red integer Red value
$green integer Green value
$blue integer Blue value
Résultat self This object

setSaturation() public méthode

Set saturation
public setSaturation ( integer $value ) : self
$value integer Saturation value
Résultat self This object

setScene() public méthode

Set scene on group
public setScene ( mixed $scene ) : self
$scene mixed Scene id or Scene object
Résultat self This object

setXY() public méthode

Set XY
public setXY ( float $x, float $y ) : self
$x float X value
$y float Y value
Résultat self This object

Property Details

$attributes protected_oe property

Group attributes
protected stdClass $attributes
Résultat stdClass

$client protected_oe property

Phue client
protected Client,phue $client
Résultat Client

$id protected_oe property

Id
protected int $id
Résultat integer