private function map($cursor) { $jobs = []; while ($cursor->hasNext()) { $jobs[] = Job::import($cursor->getNext(), $this); } return $jobs; }