コード例 #1
0
ファイル: Core.php プロジェクト: OcarinaFramework/Ocarina
 /**
  * HttpResponse rendering method
  */
 public function render()
 {
     if ($this->_response->hasNoLayout()) {
         echo $this->_response->render($this->_templateEngine);
         return;
     }
     $response = new HttpResponse($this->_request->getRouting());
     $response->setBody(array('content' => $this->_response->render($this->_templateEngine)));
     $response->setTemplate('layout.tpl');
     echo $response->render($this->_templateEngine);
 }
コード例 #2
0
 public function indexAction(HttpRequest $request, HttpResponse $response)
 {
     $response->redirect('/ocarina');
 }