$cacheRev) { $cache->clear(); @file_put_contents($cacheRevFile, $revision); } if ($cache->begin()) { $this->tool = new DocTool($manualPath.'/new/docs/en.txt'); // $this->tool->setOption('clean-url', true); $baseUrl = ''; $title = 'Doctrine Manual'; $section = null; if (isset($_GET['chapter'])) { $section = $this->tool->findByPath($_GET['chapter']); if ($this->tool->getOption('clean-url')) { $baseUrl = '../'; } } if (isset($_GET['one-page'])) { $this->tool->setOption('one-page', true); $this->tool->setOption('max-level', 0); $section = null; $baseUrl = ''; } if ($section) { while ($section->getLevel() > 1) { $section = $section->getParent(); } $this->tool->setOption('section', $section); $title .= ' - Chapter ' . $section->getIndex() . ' ' . $section->getName(); } if ($this->tool->getOption('clean-url')) { $this->tool->setOption('base-url', $baseUrl); } $cache->end(); } } }