PHP Class Phue\Command\CreateGroup

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

Protected Properties

Property Type Description
$lights Lights
$name string Name

Public Methods

Method Description
__construct ( string $name, array $lights = [] ) Constructs a command
lights ( array $lights = [] ) : self Set lights
name ( string $name ) : self Set name
send ( Client $client ) : integer Send command

Method Details

__construct() public method

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

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 ) : integer
$client Phue\Client Phue Client
return integer Group Id

Property Details

$lights protected property

Lights
protected $lights

$name protected property

Name
protected string $name
return string