PHP Class Phly\Http\Request

Requests are considered immutable; all methods that might change state are implemented such that they retain the internal state of the current message and return a new instance that contains the changed state.
Inheritance: implements Psr\Http\Message\RequestInterface, use trait MessageTrait, use trait RequestTrait
Datei anzeigen Open project: phly/http Class Usage Examples

Public Methods

Method Description
__construct ( null | string $uri = null, null | string $method = null, string | resource | StreamInterface $body = 'php://memory', array $headers = [] )
getHeader ( $header )
getHeaders ( )

Method Details

__construct() public method

public __construct ( null | string $uri = null, null | string $method = null, string | resource | StreamInterface $body = 'php://memory', array $headers = [] )
$uri null | string URI for the request, if any.
$method null | string HTTP method for the request, if any.
$body string | resource | StreamInterface Message body, if any.
$headers array Headers for the message, if any.

getHeader() public method

public getHeader ( $header )

getHeaders() public method

public getHeaders ( )