/** * File may be preprocessed with external template engine(-s) before parsing for components */ private function processExternalTemplater() { $template_extension = pathinfo($this->router_instance->getPageData()['file'], PATHINFO_EXTENSION); if ($template_extension == 'twig') { if (Settings::isFrontendLogEnabled()) { FrontendLogger::getInstance()->log('Processing twig template'); } $templater = new ExternalTemplater('twig'); $this->html = $templater->processHtml($this->html, $this->router_instance->getPageData()); } // Add any other template engines here - modify $this->html }