Fully Qualified Name: | Zend\Http\Request |
Extends: | AbstractMessage |
Implements: | RequestInterface |
HTTP Request
Name | Description | Defined By |
---|---|---|
__toString() | Allow PHP casting of this object | AbstractMessage |
fromString() | A factory that produces a Request object from a well-formed Http Request string | Request |
getAllowCustomMethods() | Request | |
getContent() | Get message content | Message |
getCookie() | Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie'); | Request |
getFiles() | Return the parameter container responsible for file parameters or a single file. | Request |
getHeader() | Get all headers of a certain name/type. | Request |
getHeaders() | Return the header container responsible for headers or all headers of a certain name/type | Request |
getMetadata() | Retrieve all metadata or a single metadatum as specified by key | Message |
getMethod() | Return the method for this request | Request |
getPost() | Return the parameter container responsible for post parameters or a single post parameter. | Request |
getQuery() | Return the parameter container responsible for query parameters or a single query parameter | Request |
getUri() | Return the URI for this request object | Request |
getUriString() | Return the URI for this request object as a string | Request |
getVersion() | Return the HTTP version for this request | AbstractMessage |
isConnect() | Is this a CONNECT method request? | Request |
isDelete() | Is this a DELETE method request? | Request |
isFlashRequest() | Is this a Flash request? | Request |
isGet() | Is this a GET method request? | Request |
isHead() | Is this a HEAD method request? | Request |
isOptions() | Is this an OPTIONS method request? | Request |
isPatch() | Is this a PATCH method request? | Request |
isPost() | Is this a POST method request? | Request |
isPropFind() | Is this a PROPFIND method request? | Request |
isPut() | Is this a PUT method request? | Request |
isTrace() | Is this a TRACE method request? | Request |
isXmlHttpRequest() | Is the request a Javascript XMLHttpRequest? | Request |
renderRequestLine() | Return the formatted request line (first line) for this http request | Request |
setAllowCustomMethods() | Request | |
setContent() | Set message content | Message |
setFiles() | Provide an alternate Parameter Container implementation for file parameters in this object, (this is NOT the primary API for value setting, for that see getFiles()) | Request |
setHeaders() | Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders()) | AbstractMessage |
setMetadata() | Set message metadata | Message |
setMethod() | Set the method for this request | Request |
setPost() | Provide an alternate Parameter Container implementation for post parameters in this object, (this is NOT the primary API for value setting, for that see getPost()) | Request |
setQuery() | Provide an alternate Parameter Container implementation for query parameters in this object, (this is NOT the primary API for value setting, for that see getQuery()) | Request |
setUri() | Set the URI/URL for this request, this can be a string or an instance of Zend\Uri\Http | Request |
setVersion() | Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2) | AbstractMessage |
toString() | Request |
Allow PHP casting of this object
Returns: string
A factory that produces a Request object from a well-formed Http Request string
Parameter Name | Type | Description |
---|---|---|
$string | string | |
$allowCustomMethods | bool |
Returns: \Request
Returns: bool
Get message content
Returns: mixed
Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');
Returns: \Header\Cookie|bool
Return the parameter container responsible for file parameters or a single file.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \ParametersInterface|mixed
Get all headers of a certain name/type.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Header |
$default | mixed|null | Default |
Returns: \Zend\Http\Headers|bool|\Zend\Http\Header\HeaderInterface|\ArrayIterator
Return the header container responsible for headers or all headers of a certain name/type
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Header |
$default | mixed|null | Default |
Returns: \Zend\Http\Headers|bool|\Zend\Http\Header\HeaderInterface|\ArrayIterator
Retrieve all metadata or a single metadatum as specified by key
Parameter Name | Type | Description |
---|---|---|
$key | null|string|int | |
$default | null|mixed |
Returns: mixed
Return the method for this request
Returns: string
Return the parameter container responsible for post parameters or a single post parameter.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \Zend\Stdlib\ParametersInterface|mixed
Return the parameter container responsible for query parameters or a single query parameter
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \Zend\Stdlib\ParametersInterface|mixed
Return the URI for this request object
Returns: \HttpUri
Return the URI for this request object as a string
Returns: string
Return the HTTP version for this request
Returns: string
Is this a CONNECT method request?
Returns: bool
Is this a DELETE method request?
Returns: bool
Is this a Flash request?
Returns: bool
Is this a GET method request?
Returns: bool
Is this a HEAD method request?
Returns: bool
Is this an OPTIONS method request?
Returns: bool
Is this a PATCH method request?
Returns: bool
Is this a POST method request?
Returns: bool
Is this a PROPFIND method request?
Returns: bool
Is this a PUT method request?
Returns: bool
Is this a TRACE method request?
Returns: bool
Is the request a Javascript XMLHttpRequest?
Should work with Prototype/Script.aculo.us, possibly others.
Returns: bool
Return the formatted request line (first line) for this http request
Returns: string
Parameter Name | Type | Description |
---|---|---|
$strictMethods | bool |
Returns:
Set message content
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: \Message
Provide an alternate Parameter Container implementation for file parameters in this object, (this is NOT the primary API for value setting, for that see getFiles())
Parameter Name | Type | Description |
---|---|---|
$files | \ParametersInterface |
Returns: \Request
Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders())
Parameter Name | Type | Description |
---|---|---|
$headers | \Headers |
Returns: \AbstractMessage
Set message metadata
Non-destructive setting of message metadata; always adds to the metadata, never overwrites the entire metadata container.
Parameter Name | Type | Description |
---|---|---|
$spec | string|int|array|\Traversable | |
$value | mixed |
Returns: \Message
Set the method for this request
Parameter Name | Type | Description |
---|---|---|
$method | string |
Returns: \Request
Provide an alternate Parameter Container implementation for post parameters in this object, (this is NOT the primary API for value setting, for that see getPost())
Parameter Name | Type | Description |
---|---|---|
$post | \Zend\Stdlib\ParametersInterface |
Returns: \Request
Provide an alternate Parameter Container implementation for query parameters in this object, (this is NOT the primary API for value setting, for that see getQuery())
Parameter Name | Type | Description |
---|---|---|
$query | \Zend\Stdlib\ParametersInterface |
Returns: \Request
Set the URI/URL for this request, this can be a string or an instance of Zend\Uri\Http
Parameter Name | Type | Description |
---|---|---|
$uri | string|\HttpUri |
Returns: \Request
Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2)
Parameter Name | Type | Description |
---|---|---|
$version | string | (Must |
Returns: \AbstractMessage
Returns: string