Kohana_Kostache::render PHP Méthode

render() public méthode

public render ( $class, $template = NULL )
    public function render($class, $template = NULL)
    {
        if ($template == NULL) {
            $template = $this->_detect_template_path($class);
        }
        return $this->_engine->loadTemplate($template)->render($class);
    }

Usage Example

 /**
  * 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();
 }
All Usage Examples Of Kohana_Kostache::render