FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Job.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Rsi\Fred\Worker;
4 
5 class Job extends \Rsi\Thing{
6 
7  public $id = null;
8  public $time = null;
9  public $interval = null;
10 
11  protected $_worker = null;
12  protected $_config = null;
13 
14  public function __construct($worker,$id,$config,$time,$interval){
15  $this->_worker = $worker;
16  $this->id = $id;
17  $this->time = $time;
18  $this->interval = $interval;
19  $this->configure($this->_config = $config);
20  }
21 
22  public function execute(){
23  }
24 
25  protected function getNextTime(){
26  return $this->interval
27  ? (substr($this->interval,0,1) == '@' ? strtotime(substr($this->interval,1)) : strtotime($this->interval,$this->time))
28  : false;
29  }
30 
31 }
__construct($worker, $id, $config, $time, $interval)
Definition: Job.php:14
Basic object.
Definition: Thing.php:13
configure($config)
Configure the object.
Definition: Thing.php:45