Esempio n. 1
0
 /**
  * Render json content
  *
  * @param string $path
  * @param array $params
  * @param null $mustClean
  * @throws \Exception
  */
 public function render($path, $params, $mustClean = null)
 {
     $content = $this->jsonHelper->encode($params);
     $this->_view->setContent($content);
 }
Esempio n. 2
0
 /**
  * @param Event         $event
  * @param ViewInterface $view
  */
 public function afterRender(Event $event, ViewInterface $view)
 {
     $content = $view->getContent();
     $content = preg_replace("/\\s+/", " ", $content);
     $view->setContent($content);
 }