Ejemplo n.º 1
0
 public function onTaskEnd(TaskEndEvent $event)
 {
     $childFileNamer = $this->childFileNamerFactory->getInstance($this->targetDirPathname);
     $name = $childFileNamer->make($event->getBatch()->getName(), '', '.zip');
     $zipPathname = sprintf('%s/%s', $this->targetDirPathname, $name);
     $this->zip->open($zipPathname, \ZIPARCHIVE::CREATE);
     foreach ($this->candidates as $pathname) {
         $this->fileAdder->addFileFromBasedir($pathname, $event->getBatch()->getDir());
     }
     $this->zip->close();
 }
Ejemplo n.º 2
0
 public function onTaskEnd(TaskEndEvent $event)
 {
     $this->writeFullSummary($event->getTimer());
 }