public function __construct(Core $core, HttpRequest $httpRequest, Route $route) { parent::__construct($core, $httpRequest, $route); $cacheDir = $this->core->getSiteCacheDir() . 'templates' . DIRECTORY_SEPARATOR; $templateBaseDir = $this->core->getSiteRoot() . 'templates' . DIRECTORY_SEPARATOR; $tplCache = new DirectoryTemplateCache($cacheDir, $templateBaseDir); $this->cmsView = new CmsView(new CmsTemplateEngine($tplCache, 'tst'), $templateBaseDir . $this->currentDomain->template . DIRECTORY_SEPARATOR . 'backend' . DIRECTORY_SEPARATOR); $this->checkAccess(); }
/** * @param Core $core The framework core instance * @param HttpRequest $httpRequest Frameworks HTTP request object * @param Route $route Frameworks route object */ public function __construct(Core $core, HttpRequest $httpRequest, Route $route) { parent::__construct($core, $httpRequest, $route); $this->logger = FrameworkLoggerFactory::getLogger($this); if ($this->auth->isLoggedIn() && $this->httpRequest->getProtocol() !== HttpRequest::PROTOCOL_HTTPS) { RequestHandler::redirect($this->httpRequest->getURL(HttpRequest::PROTOCOL_HTTPS)); } $cacheDir = $this->core->getSiteCacheDir() . 'templates' . DIRECTORY_SEPARATOR; $templateBaseDir = $this->core->getSiteRoot() . 'templates' . DIRECTORY_SEPARATOR; $tplCache = new DirectoryTemplateCache($cacheDir, $templateBaseDir); $this->templateEngine = new CmsTemplateEngine($tplCache, 'tst'); $this->cmsView = new CmsView($this->templateEngine, $templateBaseDir . $this->currentDomain->template . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR); }