PHP Class Phue\Command\CreateSchedule

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

Protected Properties

Property Type Description
$attributes array Schedule attributes
$command Phue\Command\ActionableInterface Command
$time Phue\TimePattern\TimePatternInterface Time pattern

Public Methods

Method Description
__construct ( string $name = null, mixed $time = null, Phue\Command\ActionableInterface $command = null ) Constructs a create schedule command
autodelete ( boolean $flag ) : self Set autodelete
command ( Phue\Command\ActionableInterface $command ) : self Set command
description ( string $description ) : self Set description
name ( string $name ) : self Set name
send ( Client $client ) : integer Send command
status ( $status ) : self Set status
time ( string $time ) : self Set time

Method Details

__construct() public method

Constructs a create schedule command
public __construct ( string $name = null, mixed $time = null, Phue\Command\ActionableInterface $command = null )
$name string Name of schedule
$time mixed Time to run command
$command Phue\Command\ActionableInterface Actionable command

autodelete() public method

Set autodelete
public autodelete ( boolean $flag ) : self
$flag boolean Flag
return self This object

command() public method

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

description() public method

Set description
public description ( string $description ) : self
$description string Description
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 Schedule Id

status() public method

Set status
public status ( $status ) : self
return self $status Status

time() public method

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

Property Details

$attributes protected property

Schedule attributes
protected array $attributes
return array

$command protected property

Command
protected ActionableInterface,Phue\Command $command
return Phue\Command\ActionableInterface

$time protected property

Time pattern
protected TimePatternInterface,Phue\TimePattern $time
return Phue\TimePattern\TimePatternInterface