Fix Request for PHP 5.3.0 compatibility
This commit is contained in:
parent
a242fc9e5f
commit
46f11b2b9b
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="5.3.0" />
|
||||
</project>
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ class Request extends Message implements RequestInterface
|
|||
public static function getRequestHeaders()
|
||||
{
|
||||
// http://www.php.net/manual/en/function.getallheaders.php#84262
|
||||
$headers = [];
|
||||
$headers = array();
|
||||
foreach ($_SERVER as $name => $value) {
|
||||
if (substr($name, 0, 5) === "HTTP_") {
|
||||
$headers[str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($name, 5)))))] = $value;
|
||||
|
|
@ -343,7 +343,7 @@ class Request extends Message implements RequestInterface
|
|||
/**
|
||||
* Set the body by supplying an associative array of form fields.
|
||||
*
|
||||
* In additon, add a "Content-type: application/x-www-form-urlencoded" header
|
||||
* In addition, add a "Content-type: application/x-www-form-urlencoded" header
|
||||
*
|
||||
* @param array $fields
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class RouteBuilder
|
|||
}
|
||||
|
||||
/**
|
||||
* Create and return an approrate route given an object describing a route.
|
||||
* Create and return an appropriate route given an object describing a route.
|
||||
*
|
||||
* $item must contain a "handler" property providing the classname for the
|
||||
* HandlerInterface to call getResponse() on if the route matches. "handler"
|
||||
|
|
|
|||
Loading…
Reference in New Issue