workerJobs[] = $workJob; return $this; } /** * Retrieve all Jobs added previously * * @return array */ public function getJobs() { return $this->workerJobs; } /** * Retrieve all jobs loaded previously in cache format * * @return array */ public function toArray() { $jobs = array(); foreach ($this->workerJobs as $job) { $jobs[] = $job->toArray(); } return $jobs; } }