Methods
Construct
Instantiates request.
__construct(bool $allowCustomMethods)
Parameters
$allowCustomMethods
bool
Allow PHP casting of this object
__toString() : string
Inherited
inherited_from |
\Zend\Http\AbstractMessage::__toString() |
inherited_from |
\Zend\Http\Request::__toString() |
Returns
string
A factory that produces a Request object from a well-formed Http Request string
fromString(string $string, bool $allowCustomMethods) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::fromString() |
Parameters
$string
string
$allowCustomMethods
bool
Exceptions
Returns
getAllowCustomMethods()
getAllowCustomMethods() : boolean
Inherited
inherited_from |
\Zend\Http\Request::getAllowCustomMethods() |
Returns
boolean
Get the base path.
getBasePath() : string
Get the base URL.
getBaseUrl() : string
Get raw request body
getContent() : string
Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');
getCookie() : \Zend\Http\Header\Cookie | bool
Inherited
convenience |
$request->getHeaders()->get('Cookie'); |
inherited_from |
\Zend\Http\Request::getCookie() |
Returns
Return the parameter container responsible for env parameters or a single parameter value.
getEnv(string | null $name, mixed | null $default) : \Zend\Stdlib\ParametersInterface | mixed
Parameters
$name
stringnull
Parameter name to retrieve, or null to get the whole container.
$default
mixednull
Default value to use when the parameter is missing.
Returns
Return the parameter container responsible for file parameters or a single file.
getFiles(string | null $name, mixed | null $default) : \Zend\Stdlib\ParametersInterface | mixed
Inherited
inherited_from |
\Zend\Http\Request::getFiles() |
Parameters
$name
stringnull
Parameter name to retrieve, or null to get the whole container.
$default
mixednull
Default value to use when the parameter is missing.
Returns
Return the method for this request
getMethod() : string
Inherited
inherited_from |
\Zend\Http\Request::getMethod() |
Returns
string
Return the parameter container responsible for post parameters or a single post parameter.
getPost(string | null $name, mixed | null $default) : \Zend\Stdlib\ParametersInterface | mixed
Inherited
inherited_from |
\Zend\Http\Request::getPost() |
Parameters
$name
stringnull
Parameter name to retrieve, or null to get the whole container.
$default
mixednull
Default value to use when the parameter is missing.
Returns
Return the parameter container responsible for query parameters or a single query parameter
getQuery(string | null $name, mixed | null $default) : \Zend\Stdlib\ParametersInterface | mixed
Inherited
inherited_from |
\Zend\Http\Request::getQuery() |
Parameters
$name
stringnull
Parameter name to retrieve, or null to get the whole container.
$default
mixednull
Default value to use when the parameter is missing.
Returns
Get the request URI.
getRequestUri() : string
Return the parameter container responsible for server parameters or a single parameter value.
getServer(string | null $name, mixed | null $default) : \Zend\Stdlib\ParametersInterface | mixed
see |
\Zend\Http\PhpEnvironment\http://www.faqs.org/rfcs/rfc3875.html |
Parameters
$name
stringnull
Parameter name to retrieve, or null to get the whole container.
$default
mixednull
Default value to use when the parameter is missing.
Returns
Return the URI for this request object
getUri() : \Zend\Uri\Http
Inherited
inherited_from |
\Zend\Http\Request::getUri() |
Returns
Return the URI for this request object as a string
getUriString() : string
Inherited
inherited_from |
\Zend\Http\Request::getUriString() |
Returns
string
Return the HTTP version for this request
getVersion() : string
Inherited
inherited_from |
\Zend\Http\AbstractMessage::getVersion() |
inherited_from |
\Zend\Http\Request::getVersion() |
Returns
string
Is this a CONNECT method request?
isConnect() : bool
Inherited
inherited_from |
\Zend\Http\Request::isConnect() |
Returns
bool
Is this a DELETE method request?
isDelete() : bool
Inherited
inherited_from |
\Zend\Http\Request::isDelete() |
Returns
bool
Is this a Flash request?
isFlashRequest() : bool
Inherited
inherited_from |
\Zend\Http\Request::isFlashRequest() |
Returns
bool
Is this a GET method request?
isGet() : bool
Inherited
inherited_from |
\Zend\Http\Request::isGet() |
Returns
bool
Is this a HEAD method request?
isHead() : bool
Inherited
inherited_from |
\Zend\Http\Request::isHead() |
Returns
bool
Is this an OPTIONS method request?
isOptions() : bool
Inherited
inherited_from |
\Zend\Http\Request::isOptions() |
Returns
bool
Is this a PATCH method request?
isPatch() : bool
Inherited
inherited_from |
\Zend\Http\Request::isPatch() |
Returns
bool
Is this a POST method request?
isPost() : bool
Inherited
inherited_from |
\Zend\Http\Request::isPost() |
Returns
bool
Is this a PROPFIND method request?
isPropFind() : bool
Inherited
inherited_from |
\Zend\Http\Request::isPropFind() |
Returns
bool
Is this a PUT method request?
isPut() : bool
Inherited
inherited_from |
\Zend\Http\Request::isPut() |
Returns
bool
Is this a TRACE method request?
isTrace() : bool
Inherited
inherited_from |
\Zend\Http\Request::isTrace() |
Returns
bool
Is the request a Javascript XMLHttpRequest?
isXmlHttpRequest() : bool
Inherited
Should work with Prototype/Script.aculo.us, possibly others.
inherited_from |
\Zend\Http\Request::isXmlHttpRequest() |
Returns
bool
Return the formatted request line (first line) for this http request
renderRequestLine() : string
Inherited
inherited_from |
\Zend\Http\Request::renderRequestLine() |
Returns
string
setAllowCustomMethods()
setAllowCustomMethods(boolean $strictMethods)
Inherited
inherited_from |
\Zend\Http\Request::setAllowCustomMethods() |
Parameters
$strictMethods
boolean
Set the base path.
setBasePath(string $basePath) : \Zend\Http\PhpEnvironment\self
Parameters
$basePath
string
Returns
\Zend\Http\PhpEnvironment\self
Set the base URL.
setBaseUrl(string $baseUrl) : \Zend\Http\PhpEnvironment\self
Parameters
$baseUrl
string
Returns
\Zend\Http\PhpEnvironment\self
Set message content
setContent(mixed $value) : \Zend\Stdlib\Message
Inherited
inherited_from |
\Zend\Stdlib\Message::setContent() |
inherited_from |
\Zend\Http\AbstractMessage::setContent() |
inherited_from |
\Zend\Http\Request::setContent() |
Parameters
$value
mixed
Returns
Provide an alternate Parameter Container implementation for env parameters in this object,
(this is NOT the primary API for value setting, for that see env())
setEnv(\Zend\Stdlib\ParametersInterface $env) : \Zend\Http\PhpEnvironment\Request
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())
setFiles(\Zend\Stdlib\ParametersInterface $files) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::setFiles() |
Parameters
Returns
Set the method for this request
setMethod(string $method) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::setMethod() |
Parameters
$method
string
Exceptions
Returns
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())
setPost(\Zend\Stdlib\ParametersInterface $post) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::setPost() |
Parameters
Returns
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())
setQuery(\Zend\Stdlib\ParametersInterface $query) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::setQuery() |
Parameters
Returns
Set the request URI.
setRequestUri(string $requestUri) : \Zend\Http\PhpEnvironment\self
Parameters
$requestUri
string
Returns
\Zend\Http\PhpEnvironment\self
Provide an alternate Parameter Container implementation for server parameters in this object,
(this is NOT the primary API for value setting, for that see getServer())
setServer(\Zend\Stdlib\ParametersInterface $server) : \Zend\Http\PhpEnvironment\Request
Set the URI/URL for this request, this can be a string or an instance of Zend\Uri\Http
setUri(string | \Zend\Uri\Http $uri) : \Zend\Http\Request
Inherited
inherited_from |
\Zend\Http\Request::setUri() |
Parameters
Exceptions
Returns
Set the HTTP version for this object, one of 1.0 or 1.1
(AbstractMessage::VERSION_10, AbstractMessage::VERSION_11)
setVersion(string $version) : \Zend\Http\AbstractMessage
Inherited
inherited_from |
\Zend\Http\AbstractMessage::setVersion() |
inherited_from |
\Zend\Http\Request::setVersion() |
Parameters
$version
string
(Must be 1.0 or 1.1)
Exceptions
Returns
toString()
toString() : string
Inherited
inherited_from |
\Zend\Http\Request::toString() |
Returns
string
Autodetect the base path of the request
detectBasePath() : string
Uses several criteria to determine the base path of the request.
Returns
string
Auto-detect the base path from the request environment
detectBaseUrl() : string
Uses a variety of criteria in order to detect the base URL of the request
(i.e., anything additional to the document root).
Returns
string
Detect the base URI for the request
detectRequestUri() : string
Looks at a variety of criteria in order to attempt to autodetect a base
URI, including rewrite URIs, proxy URIs, etc.
Returns
string
mapPhpFileParam()
mapPhpFileParam(array $array, string $paramName, int | string $index, string | array $value)
Parameters
$array
array
$paramName
string
$index
intstring
$value
stringarray
Convert PHP superglobal $_FILES into more sane parameter=value structure
This handles form file input with brackets (name=files[])
mapPhpFiles() : array
Properties
$allowCustomMethods
$allowCustomMethods : bool
Inherited
inherited_from |
\Zend\Http\Request::$$allowCustomMethods |
Base Path of the application.
$basePath : string
Base URL of the application.
$baseUrl : string
$content
$content : string
Inherited
inherited_from |
\Zend\Stdlib\Message::$$content |
inherited_from |
\Zend\Http\AbstractMessage::$$content |
inherited_from |
\Zend\Http\Request::$$content |
$method
$method : string
Inherited
inherited_from |
\Zend\Http\Request::$$method |
$postParams
$postParams : \Zend\Stdlib\ParametersInterface
Inherited
inherited_from |
\Zend\Http\Request::$$postParams |
Actual request URI, independent of the platform.
$requestUri : string
$uri
$uri : string | \Zend\Uri\Http
Inherited
inherited_from |
\Zend\Http\Request::$$uri |
$version
$version : string
Inherited
inherited_from |
\Zend\Http\AbstractMessage::$$version |
inherited_from |
\Zend\Http\Request::$$version |
Constants
METHOD_CONNECT
METHOD_CONNECT
Inherited
inherited_from |
\Zend\Http\Request::METHOD_CONNECT |
METHOD_DELETE
METHOD_DELETE
Inherited
inherited_from |
\Zend\Http\Request::METHOD_DELETE |
METHOD_GET
METHOD_GET
Inherited
inherited_from |
\Zend\Http\Request::METHOD_GET |
METHOD_HEAD
METHOD_HEAD
Inherited
inherited_from |
\Zend\Http\Request::METHOD_HEAD |
METHOD_OPTIONS
METHOD_OPTIONS
Inherited
inherited_from |
\Zend\Http\Request::METHOD_OPTIONS |
METHOD_PATCH
METHOD_PATCH
Inherited
inherited_from |
\Zend\Http\Request::METHOD_PATCH |
METHOD_POST
METHOD_POST
Inherited
inherited_from |
\Zend\Http\Request::METHOD_POST |
METHOD_PROPFIND
METHOD_PROPFIND
Inherited
inherited_from |
\Zend\Http\Request::METHOD_PROPFIND |
METHOD_PUT
METHOD_PUT
Inherited
inherited_from |
\Zend\Http\Request::METHOD_PUT |
METHOD_TRACE
METHOD_TRACE
Inherited
inherited_from |
\Zend\Http\Request::METHOD_TRACE |
VERSION_10
VERSION_10
Inherited
inherited_from |
\Zend\Http\AbstractMessage::VERSION_10 |
inherited_from |
\Zend\Http\Request::VERSION_10 |
VERSION_11
VERSION_11
Inherited
inherited_from |
\Zend\Http\AbstractMessage::VERSION_11 |
inherited_from |
\Zend\Http\Request::VERSION_11 |