private function readTemplateContent()
    {
        // Get page content if static file used
        if ($this->router_instance->getPageData()['html_file'] && file_exists(DIR_BASE . $this->router_instance->getPageData()['html_file'])) {
            if (Settings::isFrontendLogEnabled()) {
                FrontendLogger::getInstance()->log('Rendering simple HTML file');
            }

            ob_start();
            // Read file as is
            require_once DIR_BASE . $this->router_instance->getPageData()['html_file'];

            $this->html = ob_get_clean();
            // Prevent future component parse
            $this->use_html_file_without_parse = true;

            // Usual template read for parsing
        } elseif (is_file($this->router_instance->getPageData()['template_file'])) {

            // Get page content with components
            $this->html = file_get_contents($this->router_instance->getPageData()['template_file']);

            // Nothing found
        } else {
            $this->html = 'No template "' . $this->router_instance->getPageData()['template_file'] . '" for this page.';
        }
    }
private function readTemplateContent()
    {
        // Get page content if static file used
        if ($this->router_instance->getPageData()['html_file'] && file_exists(DIR_BASE . $this->router_instance->getPageData()['html_file'])) {
            if (Settings::isFrontendLogEnabled()) {
                FrontendLogger::getInstance()->log('Rendering simple HTML file');
            }

            ob_start();
            // Read file as is
            require_once DIR_BASE . $this->router_instance->getPageData()['html_file'];

            $this->html = ob_get_clean();
            // Prevent future component parse
            $this->use_html_file_without_parse = true;

            // Usual template read for parsing
        } elseif (is_file($this->router_instance->getPageData()['template_file'])) {

            // Get page content with components
            $this->html = file_get_contents($this->router_instance->getPageData()['template_file']);

            // Nothing found
        } else {
            $this->html = 'No template "' . $this->router_instance->getPageData()['template_file'] . '" for this page.';
        }
    }
private function readTemplateContent ( ) { // Get page content if static file used if ( $ this -> router_instance -> getPageData ( ) [ 'html_file' ] && file_exists ( DIR_BASE . $ this -> router_instance -> getPageData ( ) [ 'html_file' ] ) ) { if ( Settings :: isFrontendLogEnabled ( ) ) { FrontendLogger :: getInstance ( ) -> log ( 'Rendering simple HTML file' ) ; } ob_start ( ) ; // Read file as is require_once DIR_BASE . $ this -> router_instance -> getPageData ( ) [ 'html_file' ] ; $ this -> html = ob_get_clean ( ) ; // Prevent future component parse $ this -> use_html_file_without_parse = true ; // Usual template read for parsing } elseif ( is_file ( $ this -> router_instance -> getPageData ( ) [ 'template_file' ] ) ) { // Get page content with components $ this -> html = file_get_contents ( $ this -> router_instance -> getPageData ( ) [ 'template_file' ] ) ; // Nothing found } else { $ this -> html = 'No template "' . $ this -> router_instance -> getPageData ( ) [ 'template_file' ] . '" for this page.' ; } }
Read template content - file that is set for current requested page
Read template content - file that is set for current requested page