PHP Class Phue\Command\CreateScene

Inheritance: implements Phue\Command\CommandInterface
Show file Open project: sqmk/phue Class Usage Examples

Protected Properties

Property Type Description
$lights Lights
$name string Name
$transitionTime mixed Transition time

Public Methods

Method Description
__construct ( string $id, string $name, array $lights = [] ) Constructs a command
id ( string $id ) : self Set id
lights ( array $lights = [] ) : self Set lights
name ( string $name ) : self Set name
send ( Client $client ) : string Send command
transitionTime ( double $seconds ) : self Set transition time

Method Details

__construct() public method

Constructs a command
public __construct ( string $id, string $name, array $lights = [] )
$id string Id
$name string Name
$lights array List of light Ids or Light objects

id() public method

Set id
public id ( string $id ) : self
$id string Custom scene id
return self This object

lights() public method

Set lights
public lights ( array $lights = [] ) : self
$lights array List of light Ids or Light objects
return self This object

name() public method

Set name
public name ( string $name ) : self
$name string Name
return self This object

send() public method

Send command
public send ( Client $client ) : string
$client Phue\Client Phue Client
return string Scene Id

transitionTime() public method

Set transition time
public transitionTime ( double $seconds ) : self
$seconds double Time in seconds
return self This object

Property Details

$lights protected property

Lights
protected $lights

$name protected property

Name
protected string $name
return string

$transitionTime protected property

Transition time
protected mixed $transitionTime
return mixed