Esempio n. 1
0
 /**
  * Renders the template
  *
  * @param RenderableInterface $object
  * @param string $template
  * @return string
  */
 protected function internalRender(\Simplify\RenderableInterface $object, $template)
 {
     \Simplify::response()->header('Content-Type: text/html; charset=UTF-8');
     extract($object->getAll(), EXTR_REFS);
     ob_start();
     require $template;
     $output = ob_get_clean();
     return $output;
 }
Esempio n. 2
0
 /**
  * Renders the template
  *
  * @param Simplify_RenderableInterface $object
  * @param string $template
  * @return string
  */
 protected function internalRender(\Simplify\RenderableInterface $object, $template)
 {
     $path = $object->getTemplatesPath();
     $path = array_filter($path, function ($path) {
         return is_dir($path);
     });
     $twig = self::getTwigInstance();
     $twig->getLoader()->setPaths($path);
     $output = $twig->render($template . '.html', $object->getAll());
     return $output;
 }