mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
update to 2.1.4 version
This commit is contained in:
@@ -94,7 +94,8 @@ class Response
|
||||
*/
|
||||
public function status($http_code, $reason = null) {
|
||||
$this->status_code = $http_code;
|
||||
return $this->response->status($http_code, $reason);
|
||||
if (!$this->is_end) return $this->response->status($http_code, $reason);
|
||||
else return false;
|
||||
}
|
||||
|
||||
public function getStatusCode() {
|
||||
@@ -107,7 +108,8 @@ class Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function setStatusCode($http_code, $reason = null) {
|
||||
return $this->response->setStatusCode($http_code, $reason);
|
||||
if (!$this->is_end) return $this->response->setStatusCode($http_code, $reason);
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +119,8 @@ class Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function header($key, $value, $ucwords = null) {
|
||||
return $this->response->header($key, $value, $ucwords);
|
||||
if (!$this->is_end) return $this->response->header($key, $value, $ucwords);
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +130,7 @@ class Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function setHeader($key, $value, $ucwords = null) {
|
||||
return $this->response->setHeader($key, $value, $ucwords);
|
||||
return !$this->is_end ? $this->response->setHeader($key, $value, $ucwords) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,7 +168,7 @@ class Response
|
||||
|
||||
public function isEnd() { return $this->is_end; }
|
||||
|
||||
public function endWithStatus($status_code = 200, $content = null){
|
||||
public function endWithStatus($status_code = 200, $content = null) {
|
||||
$this->status($status_code);
|
||||
$this->end($content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user