mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
update to 2.1.4 version
This commit is contained in:
parent
c566f940e0
commit
557efc47a8
@ -3,7 +3,7 @@
|
||||
"description": "High performance QQ robot and web server development framework",
|
||||
"minimum-stability": "stable",
|
||||
"license": "Apache-2.0",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"extra": {
|
||||
"exclude_annotate": [
|
||||
"src/ZM"
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user