/**
  * Gets raw template content
  *
  * @param template PHPSTLTemplate
  * @return string
  */
 public function getContent(PHPSTLTemplate $template)
 {
     assert(is_a($template->getProvider(), get_class($this)));
     $file = $template->providerData;
     assert(file_exists($file));
     ob_start();
     $content = file_get_contents($file);
     if ($content === false) {
         $mess = ob_get_clean();
         throw new RuntimeException("Failed to read {$file}: {$mess}");
     }
     ob_end_clean();
     return $content;
 }
 public static function RenderTemplate(PHPSTLTemplate $template, $resource, $args)
 {
     assert(is_array($args));
     $sub = $template->getProvider()->getPHPSTL()->load($resource);
     print $sub->render($args);
 }
 /**
  * Gets raw template content
  *
  * @param template PHPSTLTemplate
  * @return string
  */
 public function getContent(PHPSTLTemplate $template)
 {
     assert(is_a($template->getProvider(), get_class($this)));
     $node = $template->providerData;
     assert($node instanceof CMSNode);
     return $node->getContent();
 }