Ejemplo n.º 1
0
 public function render(Customweb_Mvc_Template_IRenderContext $context)
 {
     $stream = $this->getAssetResolver()->resolveAssetStream($context->getTemplate() . '.phtml');
     if ($stream instanceof Customweb_Core_Stream_Input_File) {
         return $this->renderInclude($stream->getFilePath(), $context->getVariables());
     } else {
         return $this->renderEval($stream->read(), $context->getVariables());
     }
 }
Ejemplo n.º 2
0
 public function render(Customweb_Mvc_Template_IRenderContext $context)
 {
     foreach ($context->getVariables() as $key => $value) {
         $this->smarty->assign($key, $value);
     }
     $stream = $this->getAssetResolver()->resolveAssetStream($context->getTemplate() . '.tpl');
     if ($stream instanceof Customweb_Core_Stream_Input_File) {
         return $this->smarty->fetch($stream->getFilePath());
     } else {
         return $this->smarty->fetch('string:' . $stream->read());
     }
 }