mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 17:15:36 +08:00
update to 2.1.4 version
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"description": "High performance QQ robot and web server development framework",
|
"description": "High performance QQ robot and web server development framework",
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"version": "2.1.3",
|
"version": "2.1.4",
|
||||||
"extra": {
|
"extra": {
|
||||||
"exclude_annotate": [
|
"exclude_annotate": [
|
||||||
"src/ZM"
|
"src/ZM"
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ class Response
|
|||||||
*/
|
*/
|
||||||
public function status($http_code, $reason = null) {
|
public function status($http_code, $reason = null) {
|
||||||
$this->status_code = $http_code;
|
$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() {
|
public function getStatusCode() {
|
||||||
@@ -107,7 +108,8 @@ class Response
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function setStatusCode($http_code, $reason = null) {
|
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
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function header($key, $value, $ucwords = null) {
|
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
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function setHeader($key, $value, $ucwords = null) {
|
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 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->status($status_code);
|
||||||
$this->end($content);
|
$this->end($content);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user