mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE: HTTPRequest and HTTPResponse no longer inherit from Object, since they should not be extended.
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88797 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
26ece45bb0
commit
94d2913f09
@ -14,7 +14,7 @@
|
|||||||
* @package sapphire
|
* @package sapphire
|
||||||
* @subpackage control
|
* @subpackage control
|
||||||
*/
|
*/
|
||||||
class HTTPRequest extends Object implements ArrayAccess {
|
class HTTPRequest implements ArrayAccess {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string $url
|
* @var string $url
|
||||||
@ -102,8 +102,6 @@ class HTTPRequest extends Object implements ArrayAccess {
|
|||||||
$this->getVars = (array)$getVars;
|
$this->getVars = (array)$getVars;
|
||||||
$this->postVars = (array)$postVars;
|
$this->postVars = (array)$postVars;
|
||||||
$this->body = $body;
|
$this->body = $body;
|
||||||
|
|
||||||
parent::__construct();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isGET() {
|
function isGET() {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @package sapphire
|
* @package sapphire
|
||||||
* @subpackage control
|
* @subpackage control
|
||||||
*/
|
*/
|
||||||
class HTTPResponse extends Object {
|
class HTTPResponse {
|
||||||
protected static $status_codes = array(
|
protected static $status_codes = array(
|
||||||
100 => 'Continue',
|
100 => 'Continue',
|
||||||
101 => 'Switching Protocols',
|
101 => 'Switching Protocols',
|
||||||
@ -81,7 +81,6 @@ class HTTPResponse extends Object {
|
|||||||
* @param $statusDescription The text to be given alongside the status code. This can be accessed by javascript
|
* @param $statusDescription The text to be given alongside the status code. This can be accessed by javascript
|
||||||
*/
|
*/
|
||||||
function __construct($body = null, $statusCode = null, $statusDescription = null) {
|
function __construct($body = null, $statusCode = null, $statusDescription = null) {
|
||||||
parent::__construct();
|
|
||||||
$this->body = $body;
|
$this->body = $body;
|
||||||
if($statusCode) $this->setStatusCode($statusCode, $statusDescription);
|
if($statusCode) $this->setStatusCode($statusCode, $statusDescription);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user