Esempio n. 1
0
 private function deliver(JobInterface $job, Result $data)
 {
     if ($data->isPath()) {
         $job->getDelivery()->deliverFile($data->getData());
     } elseif ($data->isBinary()) {
         $job->getDelivery()->deliverBinary($data->getData());
     } else {
         throw new RuntimeException(sprintf('Result `%s` is not known', $data->getType()));
     }
     return $this;
 }