コード例 #1
0
ファイル: common.php プロジェクト: Dirichi/Ushahidi_Web
 private function handle(ResponseHandler $obj)
 {
     if ($obj->getStatusNumber($this) != 200) {
         header($_SERVER["SERVER_PROTOCOL"] . " " . $obj->getStatus($this));
         // FastCGI, blecch
         header("Status: " . $obj->getStatus($this));
         $_SERVER['REDIRECT_STATUS'] = $obj->getStatusNumber($this);
         // end FastCGI
     }
     $ret = $obj->getResponse($this);
     if ($ret instanceof ResponseHandler) {
         $this->handle($ret);
     } else {
         json_response($ret);
     }
 }