code: 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();
      }
docs: @param string $templatePath
  @param array $data
  
  @return string