rootPath = $_SERVER["DOCUMENT_ROOT"] . $relativePath . "/"; $this->rootUrl = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . $relativePath ."/"; } public function init() { $siteUrl = \Entity\Config::getConfig(null, "siteUrl"); if ($siteUrl != $_SERVER["HTTP_HOST"]) { header("location: http://{$siteUrl}{$_SERVER['REQUEST_URI']}"); die; } } public function getModulesPath() { return $this->rootPath . "content/modules/"; } public function serveUrl() { } }