PHP 클래스 Phue\Group

상속: implements phue\LightInterface
파일 보기 프로젝트 열기: sqmk/phue

보호된 프로퍼티들

프로퍼티 타입 설명
$attributes stdClass Group attributes
$client Client Phue client
$id integer Id

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

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() 공개 메소드

__toString
public __toString ( ) : string
리턴 string Group Id

delete() 공개 메소드

Delete group
public delete ( )

getAlert() 공개 메소드

Get alert
public getAlert ( ) : string
리턴 string Alert mode

getBrightness() 공개 메소드

Get brightness
public getBrightness ( ) : integer
리턴 integer Brightness level

getColorMode() 공개 메소드

Get color mode of group
public getColorMode ( ) : string
리턴 string Color mode

getColorTemp() 공개 메소드

Get Color temperature
public getColorTemp ( ) : integer
리턴 integer Color temperature value

getEffect() 공개 메소드

Get effect mode
public getEffect ( ) : string
리턴 string effect mode

getHue() 공개 메소드

Get hue
public getHue ( ) : integer
리턴 integer Hue value

getId() 공개 메소드

Get group Id
public getId ( ) : integer
리턴 integer Group id

getLightIds() 공개 메소드

Get light ids
public getLightIds ( ) : array
리턴 array List of light ids

getName() 공개 메소드

Get assigned name of Group
public getName ( ) : string
리턴 string Name of Group

getRGB() 공개 메소드

Get calculated RGB
public getRGB ( ) : array
리턴 array red, green, blue key/value

getSaturation() 공개 메소드

Get saturation
public getSaturation ( ) : integer
리턴 integer Saturation value

getType() 공개 메소드

Get type
public getType ( ) : string
리턴 string Group type

getXY() 공개 메소드

Get XY
public getXY ( ) : array
리턴 array X, Y key/value

isOn() 공개 메소드

Is the group on?
public isOn ( ) : boolean
리턴 boolean True if on, false if not

setAlert() 공개 메소드

Set light alert
public setAlert ( string $mode = SetLightState::ALERT_LONG_SELECT ) : self
$mode string Alert mode
리턴 self This object

setBrightness() 공개 메소드

Set brightness
public setBrightness ( integer $level = SetLightState::BRIGHTNESS_MAX ) : self
$level integer Brightness level
리턴 self This object

setColorTemp() 공개 메소드

Set Color temperature
public setColorTemp ( integer $value ) : self
$value integer Color temperature value
리턴 self This object

setEffect() 공개 메소드

Set effect
public setEffect ( string $mode = SetLightState::EFFECT_NONE ) : self
$mode string Effect mode
리턴 self This object

setHue() 공개 메소드

Set hue
public setHue ( integer $value ) : self
$value integer Group value
리턴 self This object

setLights() 공개 메소드

Set lights
public setLights ( array $lights ) : self
$lights array Light ids or Light objects
리턴 self This object

setName() 공개 메소드

Set name of group
public setName ( string $name ) : self
$name string
리턴 self This object

setOn() 공개 메소드

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

setRGB() 공개 메소드

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
리턴 self This object

setSaturation() 공개 메소드

Set saturation
public setSaturation ( integer $value ) : self
$value integer Saturation value
리턴 self This object

setScene() 공개 메소드

Set scene on group
public setScene ( mixed $scene ) : self
$scene mixed Scene id or Scene object
리턴 self This object

setXY() 공개 메소드

Set XY
public setXY ( float $x, float $y ) : self
$x float X value
$y float Y value
리턴 self This object

프로퍼티 상세

$attributes 보호되어 있는 프로퍼티

Group attributes
protected stdClass $attributes
리턴 stdClass

$client 보호되어 있는 프로퍼티

Phue client
protected Client,phue $client
리턴 Client

$id 보호되어 있는 프로퍼티

Id
protected int $id
리턴 integer