1 | <?php |
||
21 | class JobCollection |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | * |
||
26 | * All jobs from worker |
||
27 | */ |
||
28 | private $workerJobs = array(); |
||
29 | |||
30 | /** |
||
31 | * Adds into $workerJobs a Job instance |
||
32 | * Return self object |
||
33 | * |
||
34 | * @param Job $workJob Class to add into array |
||
35 | * |
||
36 | * @return JobCollection |
||
37 | */ |
||
38 | public function add(Job $workJob) |
||
44 | |||
45 | /** |
||
46 | * Retrieve all Jobs added previously |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | public function getJobs() |
||
54 | |||
55 | /** |
||
56 | * Retrieve all jobs loaded previously in cache format |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | 3 | public function toArray() |
|
71 | } |
||
72 |