Skip to content

ServerRequest: __construct Example

Terry L edited this page Jun 20, 2020 · 3 revisions

Shieldon\Psr7\ServerRequest

Extends Request.

__construct

  • 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();
Clone this wiki locally