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(); }
public function onTaskEnd(TaskEndEvent $event) { $this->writeFullSummary($event->getTimer()); }