Esempio n. 1
0
 /**
  * render view
  * @return string
  */
 public function render()
 {
     if (empty($this->response)) {
         throw new WikiaException("WikiaView: response object is null rendering {$this->templatePath}");
     }
     $method = 'render' . ucfirst($this->response->getFormat());
     if (method_exists($this, $method)) {
         return $this->{$method}();
     } else {
         throw new WikiaException("WikiaView: render() failed for method: {$method} format: {$this->response->getFormat()}");
     }
 }