RequestInterface
interface RequestInterface implements MessageInterface
Interface RequestInterface
Constants
| METHOD_OPTIONS |
|
| METHOD_GET |
|
| METHOD_HEAD |
|
| METHOD_POST |
|
| METHOD_PUT |
|
| METHOD_DELETE |
|
| METHOD_PATCH |
|
Methods
Returns a header value.
Returns the HTTP method of the current request.
Sets the HTTP method of the current request.
Returns the resource portion of the request line.
Sets the resource for the current request.
Returns the protocol version of the current request.
Returns the value of the host header.
Sets the host for the current request.
Checks if the current request is secure.
Details
in MessageInterface at line 19
string|array|null
getHeader(string $name, string|boolean $glue = "\r\n")
Returns a header value.
in MessageInterface at line 26
array
getHeaders()
Returns an array of header lines.
in MessageInterface at line 35
setHeaders(array $headers)
Sets all headers on the current message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
in MessageInterface at line 42
addHeader(string $header)
Adds a header to this message.
in MessageInterface at line 51
addHeaders(array $headers)
Adds a set of headers to this message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
in MessageInterface at line 58
string
getContent()
Returns the content of the message.
in MessageInterface at line 65
setContent(string $content)
Sets the content of the message.
in MessageInterface at line 72
string
__toString()
Returns the message document.
at line 24
string
getMethod()
Returns the HTTP method of the current request.
at line 31
setMethod(string $method)
Sets the HTTP method of the current request.
at line 38
string
getResource()
Returns the resource portion of the request line.
at line 45
setResource(string $resource)
Sets the resource for the current request.
at line 52
float
getProtocolVersion()
Returns the protocol version of the current request.
at line 59
string|null
getHost()
Returns the value of the host header.
at line 66
setHost(string $host)
Sets the host for the current request.
at line 73
Boolean
isSecure()
Checks if the current request is secure.