예제 #1
0
파일: Response.php 프로젝트: Calmacil/Mf
 /**
  * Renders output as HTML
  */
 public function render($content_type = self::TYPE_HTML)
 {
     $this->environment->addGlobal('_current_route', $this->app->getRequest()->getRoute()->getName());
     $content = $this->environment->render($this->template, $this->template_vars);
     $this->app->coreLogger()->notice("Rendering template {tpl} as {ctype} with code: [{code}]", ['tpl' => $this->template, 'ctype' => $content_type, 'code' => $this->status]);
     ob_clean();
     ob_start();
     header("HTTP/1.1 " . $this->status);
     header("Content-Type: " . $content_type);
     echo $content;
     ob_end_flush();
 }
예제 #2
0
파일: Controller.php 프로젝트: Calmacil/Mf
 /**
  * @param string $param
  * @return mixed
  */
 protected function post($param)
 {
     return $this->app->getRequest()->post($param);
 }