loader = new \Twig\Loader\FilesystemLoader(ROOT_DIR . $_ENV['VIEWS_PATH']); $this->twig = new \Twig\Environment($this->loader, ['cache' => ROOT_DIR . $_ENV['VIEWS_CACHE_PATH']]); $this->cgView = new CgView(); $this->cgView->viewPath = ROOT_DIR . "/views"; $this->init(); } #[NoReturn] protected function redirect(string $url, int $code = 301): void { header('Location: ' . $url, true, $code); exit; } protected function init(){} }