/** * Copy needed resources to output directory * * @param boolean $hasErrors Flag to define which index.html will be generated. * * @return void * @throws Exception * @see cbFDHandler::copyFile */ public function copyRessourceFolders($hasErrors = true) { if (!isset($this->_outputDir)) { throw new Exception('Output directory is not set!'); } foreach ($this->_ressourceFolders as $folder) { $this->_cbFDHandler->copyDirectory($this->_templateDir . DIRECTORY_SEPARATOR . $folder, $this->_outputDir . DIRECTORY_SEPARATOR . $folder); } $template = $hasErrors ? 'index.tpl' : 'noErrors.tpl'; $content = $this->_cbFDHandler->loadFile($this->_templateDir . DIRECTORY_SEPARATOR . $template); $this->_cbFDHandler->createFile($this->_outputDir . DIRECTORY_SEPARATOR . 'index.html', $content); }