-
Notifications
You must be signed in to change notification settings - Fork 1
ServerRequest: __construct Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\ServerRequest
Extends Request.
-
param
string
method= "GET"
Request HTTP method. -
param
string|UriInterface
uri= ""
Request URI object URI or URL. -
param
string|StreamInterface
body= ""
Request body. -
param
array
headers= []
Request headers. -
param
string
version= "1.1"
Request protocol version. -
param
array
serverParams= []
Typically $_SERVER superglobal. -
param
array
cookieParams= []
Typically $_COOKIE superglobal. -
param
array
postParams= []
Typically $_POST superglobal. -
param
array
getParams= []
Typically $_GET superglobal. -
param
array
filesParams= []
Typically $_FILES superglobal.
Example:
$serverRequest = new \Shieldon\Psr7\ServerRequest();
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.