PHP Class Phue\Client

Mostra file Open project: sqmk/phue Class Usage Examples

Protected Properties

Property Type Description
$host string Host address
$transport Phue\Transport\TransportInterface Transport
$username string Username

Public Methods

Method Description
__construct ( string $host, string $username = null ) Construct a Phue Client
getBridge ( ) : Bridge Get bridge
getGroups ( ) : Group[] Get groups
getHost ( ) : string Get host
getLights ( ) : Light[] Get lights
getRules ( ) : Rule[] Get rules
getScenes ( ) : Scene[] Get scenes
getSchedules ( ) : Schedule[] Get schedules
getSensors ( ) : Sensor[] Get sensors
getTimezones ( ) : array Get timezones
getTransport ( ) : Phue\Transport\TransportInterface Get transport
getUsername ( ) : string Get username
getUsers ( ) : User[] Get users
sendCommand ( Phue\Command\CommandInterface $command ) : mixed Send command to server
setHost ( string $host ) : self Set host
setTransport ( Phue\Transport\TransportInterface $transport ) : self Set transport
setUsername ( string $username ) : self Set username

Method Details

__construct() public method

Construct a Phue Client
public __construct ( string $host, string $username = null )
$host string Host address
$username string Username

getBridge() public method

Get bridge
public getBridge ( ) : Bridge
return Bridge Bridge object

getGroups() public method

Get groups
public getGroups ( ) : Group[]
return Group[] List of Group objects

getHost() public method

Get host
public getHost ( ) : string
return string Host address

getLights() public method

Get lights
public getLights ( ) : Light[]
return Light[] List of Light objects

getRules() public method

Get rules
public getRules ( ) : Rule[]
return Rule[] List of Rule objects

getScenes() public method

Get scenes
public getScenes ( ) : Scene[]
return Scene[] List of Scene objects

getSchedules() public method

Get schedules
public getSchedules ( ) : Schedule[]
return Schedule[] List of Schedule objects

getSensors() public method

Get sensors
public getSensors ( ) : Sensor[]
return Sensor[] List of Sensor objects

getTimezones() public method

Get timezones
public getTimezones ( ) : array
return array List of timezones

getTransport() public method

Get transport
public getTransport ( ) : Phue\Transport\TransportInterface
return Phue\Transport\TransportInterface Transport

getUsername() public method

Get username
public getUsername ( ) : string
return string Username

getUsers() public method

Get users
public getUsers ( ) : User[]
return User[] List of User objects

sendCommand() public method

Send command to server
public sendCommand ( Phue\Command\CommandInterface $command ) : mixed
$command Phue\Command\CommandInterface Phue command
return mixed Command result

setHost() public method

Set host
public setHost ( string $host ) : self
$host string Host
return self This object

setTransport() public method

Set transport
public setTransport ( Phue\Transport\TransportInterface $transport ) : self
$transport Phue\Transport\TransportInterface Transport
return self This object

setUsername() public method

Set username
public setUsername ( string $username ) : self
$username string Username
return self This object

Property Details

$host protected_oe property

Host address
protected string $host
return string

$transport protected_oe property

Transport
protected TransportInterface,Phue\Transport $transport
return Phue\Transport\TransportInterface

$username protected_oe property

Username
protected string $username
return string