public function riseFixture() { if (is_null($this->cachePath)) { return; } $targetPath = rtrim($this->fullCachePath, '\\/'); $sourcePath = rtrim($this->sourceFilesDir, '\\/'); directoryClear($targetPath); directoryCopy($sourcePath, $targetPath); }
public function build() { $cacheFile = bulldocGetIndexCacheFileName($this->booKey); if (file_exists($cacheFile)) { unlink($cacheFile); } if (!file_exists($this->outputPath)) { mkdir($this->outputPath, 0777, true); } else { directoryClear($this->outputPath); } $this->copyAssetsContent(); $this->copyMediaContent(); $rootContent = $this->render->renderPage('index.html'); $this->saveDestFile('index.html', $rootContent); $this->buildSection($this->toc, '/'); if ($this->book->getOutputMode() == 'html_single') { $this->buildSinglePage(); } if ($this->book->getOutputMode() == 'chm') { $this->buildCHM(); } }