| 1 | <?php |
||
| 9 | abstract class Job implements JobInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $args; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param array $args |
||
| 18 | */ |
||
| 19 | public function __construct(array $args = array()) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | public function execute() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return boolean |
||
| 34 | */ |
||
| 35 | abstract protected function run(); |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return QueueName |
||
| 39 | */ |
||
| 40 | public function getJobName() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * get job name |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | public function getClassName() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * get args |
||
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | public function getArgs() |
||
| 62 | } |