public static function renderTemplate(string $templatePath, array $data = []) : string
    {
        if (substr($templatePath, 0, 1) != '/') {
            $templatePath = AbstractApp::getAppRoot() . '/' . $templatePath;
        }

        $phtml = new static($templatePath);
        $phtml->addViewDatas($data);

        return $phtml->render();
    }
public static function renderTemplate(string $templatePath, array $data = []) : string
    {
        if (substr($templatePath, 0, 1) != '/') {
            $templatePath = AbstractApp::getAppRoot() . '/' . $templatePath;
        }

        $phtml = new static($templatePath);
        $phtml->addViewDatas($data);

        return $phtml->render();
    }
@param string $templatePath
@param array $data

@return string