render() public method

public render ( $class, $template = NULL )
コード例 #1
0
 /**
  * Kick off the Mustache render process and return the rendered string (HTML/JSON/etc)
  *
  * @return string
  */
 public function render()
 {
     /**
      * If base layout is not to be rendered
      */
     if (!$this->render_layout) {
         return parent::render();
     }
     /**
      * We want to include the base layout
      */
     $partials = $this->_partials;
     $partials[self::CONTENT_PARTIAL] = $this->_template;
     $template = $this->_load($this->_layout);
     return $this->_stash($template, $this, $partials)->render();
 }
コード例 #2
0
ファイル: Layout.php プロジェクト: modulargaming/kostache
 public function render($class, $template = NULL)
 {
     $this->_engine->setPartials(array(Kostache_Layout::CONTENT_PARTIAL => parent::render($class, $template)));
     return $this->_engine->loadTemplate($this->_layout)->render($class);
 }