Ejemplo n.º 1
0
 public function download(ShowInterface $show)
 {
     foreach ($this->downloaders as $downloader) {
         if ($show->getType() == $downloader->getSupportedType()) {
             $downloader->download($show);
             return;
         }
     }
     throw new \RunTimeException(sprintf('There is no downloaders for "%s" type', $show->getType()));
 }