/** * @param AbstractFile $file * @param integer $count The number of queued operations on the unit of work * @throws \Doxport\Exception\IOException * @return void */ protected function flush(AbstractFile $file, $count = null) { $this->logger->notice(' Flushing and syncing...'); $file->flush(); $file->sync(); $this->logger->notice(' done. Committing deletes...'); $this->chunk->begin(); $this->em->flush(); $this->em->clear(); $this->chunk->end($count); $this->logger->notice(' done.'); }
/** * Flushes the files * * @param AbstractFile $file * @param AbstractFile|null $clearFile * @param int $count * @return void */ protected function flush(AbstractFile $file, AbstractFile $clearFile = null, $count = 0) { $this->logger->notice(' Flushing...'); if ($count) { $this->chunk->begin(); } $file->flush(); if ($clearFile) { $clearFile->flush(); } if ($count) { $this->chunk->end($count); } $this->logger->notice(' done.'); }