PHP Class Phue\Schedule

Show file Open project: sqmk/phue

Protected Properties

Property Type Description
$attributes stdClass Schedule attributes
$client Client Phue client
$id integer Id

Public Methods

Method Description
__construct ( integer $id, stdClass $attributes, Client $client ) Construct a Phue Schedule object
__toString ( ) : string __toString
delete ( ) Delete schedule
getCommand ( ) : array Get command
getDescription ( ) : string Get description
getId ( ) : integer Get schedule Id
getName ( ) : string Get assigned name of Schedule
getStatus ( ) : string Get status
getTime ( ) : string Get scheduled time
isAutoDeleted ( ) : boolean Is auto deleted?
isEnabled ( ) : boolean Is schedule enabled.
setAutoDelete ( boolean $flag ) : self Set auto delete
setCommand ( Phue\Command\ActionableInterface $command ) : self Set command
setDescription ( string $description ) : self Set description
setName ( string $name ) : self Set name of schedule
setStatus ( string $status ) : self Set status.
setTime ( string $time ) : self Set time

Method Details

__construct() public method

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

__toString() public method

__toString
public __toString ( ) : string
return string Schedule Id

delete() public method

Delete schedule
public delete ( )

getCommand() public method

Get command
public getCommand ( ) : array
return array Command attributes

getDescription() public method

Get description
public getDescription ( ) : string
return string Description of Schedule

getId() public method

Get schedule Id
public getId ( ) : integer
return integer Schedule id

getName() public method

Get assigned name of Schedule
public getName ( ) : string
return string Name of Schedule

getStatus() public method

Get status
public getStatus ( ) : string
return string Get status.

getTime() public method

Get scheduled time
public getTime ( ) : string
return string Time of schedule

isAutoDeleted() public method

Is auto deleted?
public isAutoDeleted ( ) : boolean
return boolean True if auto delete, false if not

isEnabled() public method

Is schedule enabled.
public isEnabled ( ) : boolean
return boolean True if enabled, false if not.

setAutoDelete() public method

Set auto delete
public setAutoDelete ( boolean $flag ) : self
$flag boolean True to auto delete, false if not
return self This object

setCommand() public method

Set command
public setCommand ( Phue\Command\ActionableInterface $command ) : self
$command Phue\Command\ActionableInterface Actionable command
return self This object

setDescription() public method

Set description
public setDescription ( string $description ) : self
$description string
return self This object

setName() public method

Set name of schedule
public setName ( string $name ) : self
$name string
return self This object

setStatus() public method

Set status.
public setStatus ( string $status ) : self
$status string Status.
return self This object

setTime() public method

Set time
public setTime ( string $time ) : self
$time string Time
return self This object

Property Details

$attributes protected property

Schedule attributes
protected stdClass $attributes
return stdClass

$client protected property

Phue client
protected Client,phue $client
return Client

$id protected property

Id
protected int $id
return integer