Exemplo n.º 1
0
 public function postDispatch(\Yaf\Request_Abstract $request, \Yaf\Response_Abstract $response)
 {
     $body = $response->getBody();
     $response->clearBody();
     $layout = new Yaf\View\Simple($this->_layoutDir);
     $layout->content = $body;
     $layout->base_url = '';
     $layout->assign('layout', $this->_layoutVars);
     $response->setBody($layout->render($this->_layoutFile));
 }
Exemplo n.º 2
0
 public function postDispatch(Request_Abstract $request, Response_Abstract $response)
 {
     /* get the body of the response */
     $body = $response->getBody();
     /*clear existing response*/
     $response->clearBody();
     /* wrap it in the layout */
     $layout = Registry::get("Smarty");
     $layout->content = $body;
     $layout->assign('layout', $this->_layoutVars);
     /* set the response to use the wrapped version of the content */
     $response->setBody($layout->render($this->_layoutFile));
 }
Exemplo n.º 3
0
 /**
  *
  * @param \Yaf\Request_Abstract $request
  * @param \Yaf\Response_Abstract $response
  */
 public function postDispatch(Request $request, Response $response)
 {
     /* get the body of the response */
     $body = $response->getBody();
     /*clear existing response*/
     $response->clearBody();
     /* wrap it in the layout */
     $layout = new \Yaf\View\Simple($this->_layoutDir);
     $layout->content = $body;
     $layout->assign('layout', $this->_layoutVars);
     /* set the response to use the wrapped version of the content */
     $response->setBody($layout->render($this->_layoutFile));
 }