config = $config; $this->themeManager = $themeManager; if ($this->config->get('isDeveloperMode')) { $this->mainHtmlFilePath = $this->htmlFilePathForDeveloperMode; } } protected function getThemeManager() { return $this->themeManager; } protected function getConfig() { return $this->config; } public function display($runScript = null, $mainHtmlFilePath = null) { if (is_null($runScript)) { $runScript = $this->runScript; } if (is_null($mainHtmlFilePath)) { $mainHtmlFilePath = $this->mainHtmlFilePath; } $html = file_get_contents($mainHtmlFilePath); $html = str_replace('{{cacheTimestamp}}', $this->getConfig()->get('cacheTimestamp', 0), $html); $html = str_replace('{{useCache}}', $this->getConfig()->get('useCache') ? 'true' : 'false' , $html); $html = str_replace('{{stylesheet}}', $this->getThemeManager()->getStylesheet(), $html); $html = str_replace('{{runScript}}', $runScript , $html); echo $html; exit; } }