output parsed template

@param SimpleTemplateFilterInterface []
@return string
@throws SimpleTemplateException
@throws \vxPHP\Application\Exception\ApplicationException
431486
public function display($defaultFilters = null) {

		$this->extend();

		$this->fillBuffer();

		// check whether pre-configured filters are already in place
		
		if(is_null($defaultFilters)) {

			// add default filters

			$this->defaultFilters = [
				new AnchorHref(),
				new ImageCache(),
				// new AssetsPath()
			];

			if(!$this->ignoreLocales) {
                $this->defaultFilters[] = new LocalizedPhrases();
			}

		}

		else {

		    $this->defaultFilters = $defaultFilters;

            if(!$this->ignoreLocales) {

                // check whether adding a localization filter is necessary

                $found = false;

                foreach($this->defaultFilters as $filter) {

                    if($filter instanceof LocalizedPhrases) {
                        $found = true;
                        break;
                    }

                }

                if(!$found) {
                    $this->defaultFilters[] = new LocalizedPhrases();
                }
            }

        }

        // add configured filters

        if($templatingConfig = Application::getInstance()->getConfig()->templating) {

            foreach($templatingConfig->filters as $id => $filter) {

                if(!in_array($id, $this->blockedFilters)) {

                    // load class file

                    $instance = new $filter['class']();

                    // check whether instance implements FilterInterface

                    if (!$instance instanceof SimpleTemplateFilterInterface) {
                        throw new SimpleTemplateException(sprintf("Template filter '%s' (class %s) does not implement the SimpleTemplateFilterInterface.", $id, $filter['class']));
                    }

                    $this->defaultFilters[] = $instance;

                }
            }
        }

        $this->applyFilters();

		return $this->contents;
	}
1191548
public function item_template() {
		$output = '<script type="text/html" id="' . esc_attr( $this->id() ) . '-tmpl">';
		$output .= '<div class="uix-item">';
		if ( false !== strpos( $this->child['config']->struct['view'], ABSPATH ) ) {
			ob_start();
			include $this->child['config']->struct['view'];
			$output .= ob_get_clean();
		} else {
			$output .= $this->child['config']->struct['view'];
		}
		$output .= '</div>';
		$output .= '</script>';

		return $output;
	}
1340084
private function parse()
    {
        if (isset($this->template, $this->frontMatter)) {
            return $this;
        }

        $source = $this->readSourceFile();

        $parts = preg_split('/[\n]*[-]{3}[\n]/', $source, 2);
        if (count($parts) === 2) {
            $this->frontMatter = Yaml::parse($parts[0]);
            $this->template = trim($parts[1]);
        } else {
            $this->frontMatter = array();
            $this->template = trim($source);
        }

        return $this;
    }
768067
public function getLayoutTemplate(string $context = ViewInterface::CONTEXT_DEFAULT): ?string
    {
        $layoutView = $this->buildLayoutView($context);
        if (!$layoutView instanceof LayoutViewInterface) {
            return $this->getPageLayoutTemplate();
        }

        return $layoutView->getTemplate();
    }
1209398
public function render_template() {
		// template
		$_output = null;

		if ( ! empty( $this->struct['template'] ) ) {
			ob_start();
			include $this->struct['template'];
			$_output .= ob_get_clean();
		}

		return $_output;
	}
953673
protected function template()
    {
        $reflector = new \ReflectionClass(get_class($this));
        $classname = $reflector->getName();

        $template = preg_replace('/(Application|Synapse)\\\View\\\/', '', $classname);
        $template = str_replace('\\', '/', $template);

        return $template;
    }
722243
private function getTemplate()
    {
        $template = config('laranotify.template');
        if ($template == '' && $this->template == '') {
            return $this->defaultTemplate();
        }

        if ($this->template != '') {
            return ($this->template);
        }

        return view($template);
    }
1244619
public function renderTranslatableTemplate($templateString)
    {
        if ($templateString instanceof Translation) {
            $origLang = $this->translator()->getLocale();
            foreach ($this->translator()->availableLocales() as $lang) {
                if (!isset($templateString[$lang])) {
                    continue;
                }
                $translation = $templateString[$lang];
                $isBlank = empty($translation) && !is_numeric($translation);
                if (!$isBlank) {
                    $this->translator()->setLocale($lang);
                    $translation = $this->renderTemplate($translation);
                    if ($translation !== null) {
                        $templateString[$lang] = $translation;
                    }
                }
            }
            $this->translator()->setLocale($origLang);
            $templateString->isRendered = true;

            return $templateString;
        } elseif (is_string($templateString)) {
            $isBlank = empty($templateString) && !is_numeric($templateString);
            if (!$isBlank) {
                return $this->renderTemplate($templateString);
            }
        }

        return '';
    }
1349307
public function forTemplate()
    {
        $template = $this->getClassName();

        if (\SSViewer::hasTemplate($template)) {
            return $this->renderWith($template);
        }

        return _t('ContentElement.missingTemplate', 'Missing Template for {template}', [
            'template' => $template
        ]);
    }
338754
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.';
        }
    }
287086
protected function _renderTemplate()
	{
		$replace = array();
		$with    = array();

		foreach ($this->_template_tags as $jdoc => $args)
		{
			$replace[] = $jdoc;
			$with[]    = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
		}

		return str_replace($replace, $with, $this->_template);
	}
1063241
private function parse() {

		$lines = file($this -> viewmodel -> getFile());

		$this -> code = '';

		$classes = [

			'MatchEcho',
			'MatchForeach',
			'MatchEndForeach',
			'MatchFor',
			'MatchEndFor',
			'MatchIf',
			'MatchIsset',
			'MatchNotIsset',
			'MatchEmpty',
			'MatchNotEmpty',
			'MatchElseIf',
			'MatchElse',
			'MatchEndIf',
			'MatchEndIsset',
			'MatchEndNotIsset',
			'MatchEndEmpty',
			'MatchEndNotEmpty',
			'MatchForm',
			'MatchTranslation',
			'MatchEscape',
			'MatchRouter',
			'MatchHelper',
			'MatchPartial',
			'MatchFails',
			'MatchPasses',
			'MatchPHPTags'
		];

		foreach($lines as $linenumber => $line) {
			
			foreach($classes as $class) {
				
				$class = self :: NAMESPACE_MATCH . $class;
				$match = new $class($line);
				$line  = $match -> replace() -> getLine();
			}

			//User defined functions
			foreach(TemplateData :: getTemplateFunctions() as $action => $closure) {

				$class = self :: NAMESPACE_MATCH . 'MatchUserDefined';
				$match = new $class($line, $action);
				$line  = $match -> replace() -> getLine();
			}
			
			$this -> code .= trim($line) . "\n";
		}

		$this -> code = trim($this -> code);

		return $this -> code;
	}
1168021
protected function getHtmlTemplate(): string
    {
        if ($this->HtmlTemplate === null) {
            throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                ->setHtmlTemplate($this->HtmlTemplate);
        }
        if (empty($this->HtmlTemplate) == false) {
            eval("include '$this->HtmlTemplate';");
            return '';
        } else {
            $filepathold = (new \ReflectionClass(static::class))->getFileName();

            $filepath = strtr($filepathold, ['.php' => '.tpl.php']);
            if (is_file($filepath)) {
                eval("include '$filepath';");
                return $filepath;
            }

            $getFilename_no_Extension = (new Fileinfo($filepathold))
                ->getFilename_no_Extension();

            $filepath = dirname($filepath) . '/' . $getFilename_no_Extension . '/' . $getFilename_no_Extension . '.tpl.php';
            eval("include '$filepath';");
            if (is_file($filepath)) {
                return $filepath;
            } else {
                throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                    ->setHtmlTemplate($this->HtmlTemplate);
            }
        }
    }
875100
private function loadTemplate()
    {
        return [
            0 => $this->template[0] != '' ? file_get_contents($this->template[0]) : '',
            1 => $this->template[1] != '' ? file_get_contents($this->template[1]) : '',
            2 => $this->template[2] != '' ? file_get_contents($this->template[2]) : '',
        ];
    }
1011983
private function compileTemplate($templatePath, $destinationPath, $data = null)
    {
        if ($data == null) {
            $data = $destinationPath;
            $destinationPath = null;
        }
        
        if (! isset($this->templates[$templatePath])) {
            $this->templates[$templatePath] = file_get_contents($templatePath);
        }
        
        $compiled = preg_replace_callback('/{{\s*([A-z0-9_-]+)\s*}}/', function ($matches) use ($data) {
            if (isset($data[$matches[1]])) {
                return $data[$matches[1]];
            }
            
            return $matches[0];
        }, $this->templates[$templatePath]);
        
        if ($destinationPath) {
            file_put_contents($destinationPath, $compiled);
        }
        
        return $compiled;
    }
922073
protected function renderView(): string
    {
        $viewFile = $this->pathViews . '/' . $this->view . '.phtml';
        if (!file_exists($viewFile)) {
            throw new TemplatingException(sprintf('View file not found. (%s)', $viewFile));
        }
        $viewContent = file_get_contents($viewFile);
        if (preg_match('/<!-- extends "(.+)" -->/Usi', $viewContent, $matches) === 1) {
            $this->setLayout($matches[1]);
        }

        return $this->renderFile($viewFile);
    }
769052
public function getEmailTemplateView()
    {
        if (! $this->_template_view instanceof LibBaseViewTemplate) {

            if (!isset($this->_template_view)) {
                $this->_template_view = clone $this->_mixer->getIdentifier();
                $this->_template_view->path = array('emails');
                $this->_template_view->name = 'template';
            }

            $identifier = clone $this->_mixer->getIdentifier();
            $identifier->path = array('emails');

            $directory = dirname($identifier->filepath);
            if (strpos($directory, ANPATH_ROOT) === false) {
                $directory = ANPATH_ROOT.$directory;
            }

            $paths[] = $directory;
            $paths[] = implode(DS, array(ANPATH_THEMES, $this->getService('application')->getTemplate(), 'emails', $identifier->type.'_'.$identifier->package));
            $paths[] = implode(DS, array(ANPATH_THEMES, $this->getService('application')->getTemplate(), 'emails'));

            $config = array(
                'base_url' => $this->_base_url,
                'template_paths' => $paths,
            );

            register_default(array(
                'identifier' => $this->_template_view,
                'default' => 'LibBaseViewTemplate'
            ));

            $this->_template_view = $this->getService($this->_template_view, $config);
        }

        return $this->_template_view;
    }