Request
in package
implements
RequestInterface
uses
RequestDecoratorTrait
Table of Contents
Interfaces
- RequestInterface
Methods
- __construct() : mixed
- getMethod() : string
- {@inheritdoc}
- getRequest() : RequestInterface
- Returns the decorated request.
- getRequestTarget() : string
- {@inheritdoc}
- getUri() : UriInterface
- {@inheritdoc}
- withMethod() : self
- {@inheritdoc}
- withRequest() : self
- Exchanges the underlying request with another.
- withRequestTarget() : self
- {@inheritdoc}
- withUri() : self
- {@inheritdoc}
Methods
__construct()
public
__construct(string $method, string|UriInterface $uri[, array<string|int, mixed> $headers = [] ][, string|null|resource|StreamInterface $body = null ][, string $version = '1.1' ]) : mixed
Parameters
- $method : string
-
HTTP method
- $uri : string|UriInterface
-
URI
- $headers : array<string|int, mixed> = []
-
Request headers
- $body : string|null|resource|StreamInterface = null
-
Request body
- $version : string = '1.1'
-
Protocol version
getMethod()
{@inheritdoc}
public
getMethod() : string
Return values
stringgetRequest()
Returns the decorated request.
public
getRequest() : RequestInterface
Since the underlying Request is immutable as well exposing it is not an issue, because it's state cannot be altered
Return values
RequestInterfacegetRequestTarget()
{@inheritdoc}
public
getRequestTarget() : string
Return values
stringgetUri()
{@inheritdoc}
public
getUri() : UriInterface
Return values
UriInterfacewithMethod()
{@inheritdoc}
public
withMethod(mixed $method) : self
Parameters
- $method : mixed
Return values
selfwithRequest()
Exchanges the underlying request with another.
public
withRequest(RequestInterface $request) : self
Parameters
- $request : RequestInterface
Return values
selfwithRequestTarget()
{@inheritdoc}
public
withRequestTarget(mixed $requestTarget) : self
Parameters
- $requestTarget : mixed
Return values
selfwithUri()
{@inheritdoc}
public
withUri(UriInterface $uri[, mixed $preserveHost = false ]) : self
Parameters
- $uri : UriInterface
- $preserveHost : mixed = false