JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrsheetExport = $sheetExport; $this->temporaryFile = $temporaryFile; $this->writerType = $writerType; $this->sheetIndex = $sheetIndex; $this->page = $page; $this->chunkSize = $chunkSize; } /** * Get the middleware the job should be dispatched through. * * @return array */ public function middleware() { return (method_exists($this->sheetExport, 'middleware')) ? $this->sheetExport->middleware() : []; } /** * @param Writer $writer * * @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Reader\Exception */ public function handle(Writer $writer) { (new LocalizeJob($this->sheetExport))->handle($this, function () use ($writer) { if ($this->sheetExport instanceof WithEvents) { $this->registerListeners($this->sheetExport->registerEvents()); } $writer = $writer->reopen($this->temporaryFile, $this->writerType); $sheet = $writer->getSheetByIndex($this->sheetIndex); $query = $this->sheetExport->query()->forPage($this->page, $this->chunkSize); $sheet->appendRows($query->get(), $this->sheetExport); $writer->write($this->sheetExport, $this->temporaryFile, $this->writerType); $this->raise(new AfterChunk($sheet, $this->sheetExport, ($this->page - 1) * $this->chunkSize)); $this->clearListeners(); }); } }