protected function get(string $file, array $vars = [], string $dir = ''): string
    {
        $template_vars = $this->vars; // Route vars as template vars.

        if (isset($template_vars[$file])) { // File-specific vars?
            $template_vars = array_replace_recursive($template_vars, $template_vars[$file]);
        }
        $template_vars = array_replace_recursive($template_vars, $vars);
        $Template      = $this->c::getTemplate($file, $dir, ['Route' => $this]);

        return $Template->parse($template_vars);
    }
protected function get(string $file, array $vars = [], string $dir = ''): string
    {
        $template_vars = $this->vars; // Route vars as template vars.

        if (isset($template_vars[$file])) { // File-specific vars?
            $template_vars = array_replace_recursive($template_vars, $template_vars[$file]);
        }
        $template_vars = array_replace_recursive($template_vars, $vars);
        $Template      = $this->c::getTemplate($file, $dir, ['Route' => $this]);

        return $Template->parse($template_vars);
    }
protected function get ( string $ file , array $ vars = [ ] , string $ dir = '' ) : string { $ template_vars = $ this -> vars ; // Route vars as template vars. if ( isset ( $ template_vars [ $ file ] ) ) { // File-specific vars? $ template_vars = array_replace_recursive ( $ template_vars , $ template_vars [ $ file ] ) ; } $ template_vars = array_replace_recursive ( $ template_vars , $ vars ) ; $ Template = $ this -> c :: getTemplate ( $ file , $ dir , [ 'Route' => $ this ] ) ; return $ Template -> parse ( $ template_vars ) ; }
Get a template.

@since 161008 Route.

@param string $file Relative to templates dir.
@param array  $vars Template vars for the include.
@param string $dir  From a specific directory?

@return string Parsed template contents.
Get a template .