/** * Save snapshot information on hard-drive. */ protected function saveSnapshot() { $filename = $this->config->snapshotFilename($this->getException(), time()); $this->files->write($filename, $this->render(), FilesInterface::RUNTIME, true); $snapshots = $this->files->getFiles($this->config->reportingDirectory()); if (count($snapshots) > $this->config->maxSnapshots()) { $this->performRotation($snapshots); } }