src/Valkyrja/View/PhpView.php
protected function renderTemplate(string $templatePath, array $variables = []): string
    {
        $variables = array_merge($this->variables, $variables);

        extract($variables, EXTR_OVERWRITE);

        ob_start();
        include $templatePath;

        return ob_get_clean();
    }
protected function renderTemplate(string $templatePath, array $variables = []): string
    {
        $variables = array_merge($this->variables, $variables);

        extract($variables, EXTR_OVERWRITE);

        ob_start();
        include $templatePath;

        return ob_get_clean();
    }
Render a template.

@param string $templatePath The template path
@param array  $variables    [optional] The variables to set

@return string