forked from otaviofcs/yii-gearman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbstractWorkerAction.php
46 lines (44 loc) · 1002 Bytes
/
AbstractWorkerAction.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* File contains class AbstractWorkerAction
*
* @author Alexey Korchevsky <[email protected]>
* @link https://github.com/mitallast/yii-gearman
* @copyright Alexey Korchevsky <[email protected]> 2010-2011
* @license https://github.com/mitallast/yii-gearman/blob/master/license
*/
/**
* Class AbstractWorkerAction is realisation of IWorkerAction interface, the base class for all worker
* controller action classes.
*
* Component extends basic CAction for work with job object as action parameter.
*
* @abstract
* @see
* @author Alexey Korchevsky <[email protected]>
* @package ext.worker
* @version 0.2
* @since 0.2
*/
abstract class AbstractWorkerAction extends CAction implements IWorkerAction
{
private $_job;
/**
* Set job to work in action.
*
* @param GearmanJob $job
*/
public function setJob($job)
{
$this->_job = $job;
}
/**
* Get job to work in action.
*
* @return GearmanJob
*/
public function getJob()
{
return $this->_job;
}
}