src/Comodojo/Extender/Events/JobStatusEvent.php 1 location
|
@@ 27-47 (lines=21) @@
|
| 24 |
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 25 |
|
*/ |
| 26 |
|
|
| 27 |
|
class JobStatusEvent extends AbstractEvent { |
| 28 |
|
|
| 29 |
|
private $job; |
| 30 |
|
|
| 31 |
|
public function __construct($status, Job $job) { |
| 32 |
|
|
| 33 |
|
$name = $job->name; |
| 34 |
|
|
| 35 |
|
parent::__construct("extender.job.$name.$status"); |
| 36 |
|
|
| 37 |
|
$this->job = $job; |
| 38 |
|
|
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
public function getJob() { |
| 42 |
|
|
| 43 |
|
return $this->job; |
| 44 |
|
|
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
} |
| 48 |
|
|
src/Comodojo/Extender/Events/TaskStatusEvent.php 1 location
|
@@ 27-49 (lines=23) @@
|
| 24 |
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 25 |
|
*/ |
| 26 |
|
|
| 27 |
|
class TaskStatusEvent extends AbstractEvent { |
| 28 |
|
|
| 29 |
|
private $task; |
| 30 |
|
|
| 31 |
|
public function __construct($status, TaskInterface $task) { |
| 32 |
|
|
| 33 |
|
$name = $task->name; |
| 34 |
|
|
| 35 |
|
parent::__construct("extender.task.$name.$status"); |
| 36 |
|
|
| 37 |
|
$this->status = $status; |
| 38 |
|
|
| 39 |
|
$this->task = $task; |
| 40 |
|
|
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function getTask() { |
| 44 |
|
|
| 45 |
|
return $this->task; |
| 46 |
|
|
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
} |
| 50 |
|
|