Zend Framework  3.0
Public Member Functions | List of all members
Request Class Reference

Public Member Functions

 __construct ($method, $uri, array $headers, array $cookies, array $queryStringArguments, array $postParameters, array $uploadedFiles, array $serverParams)
 Overload constructor.
 
- Public Member Functions inherited from Request
 __construct ($allowCustomMethods=true)
 Construct Instantiates request.
 
 getContent ()
 Get raw request body.
 
 setCookies ($cookie)
 Set cookies.
 
 setRequestUri ($requestUri)
 Set the request URI.
 
 getRequestUri ()
 Get the request URI.
 
 setBaseUrl ($baseUrl)
 Set the base URL.
 
 getBaseUrl ()
 Get the base URL.
 
 setBasePath ($basePath)
 Set the base path.
 
 getBasePath ()
 Get the base path.
 
 setServer (ParametersInterface $server)
 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())
 
 getServer ($name=null, $default=null)
 Return the parameter container responsible for server parameters or a single parameter value.
 
 setEnv (ParametersInterface $env)
 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())
 
 getEnv ($name=null, $default=null)
 Return the parameter container responsible for env parameters or a single parameter value.
 
- Public Member Functions inherited from Request
 setMethod ($method)
 Set the method for this request.
 
 getMethod ()
 Return the method for this request.
 
 setUri ($uri)
 Set the URI/URL for this request, this can be a string or an instance of Zend.
 
 getUri ()
 Return the URI for this request object.
 
 getUriString ()
 Return the URI for this request object as a string.
 
 setQuery (ParametersInterface $query)
 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())
 
 getQuery ($name=null, $default=null)
 Return the parameter container responsible for query parameters or a single query parameter.
 
 setPost (ParametersInterface $post)
 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())
 
 getPost ($name=null, $default=null)
 Return the parameter container responsible for post parameters or a single post parameter.
 
 getCookie ()
 Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');.
 
 setFiles (ParametersInterface $files)
 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())
 
 getFiles ($name=null, $default=null)
 Return the parameter container responsible for file parameters or a single file.
 
 getHeaders ($name=null, $default=false)
 Return the header container responsible for headers or all headers of a certain name/type.
 
 getHeader ($name, $default=false)
 Get all headers of a certain name/type.
 
 isOptions ()
 Is this an OPTIONS method request?
 
 isPropFind ()
 Is this a PROPFIND method request?
 
 isGet ()
 Is this a GET method request?
 
 isHead ()
 Is this a HEAD method request?
 
 isPost ()
 Is this a POST method request?
 
 isPut ()
 Is this a PUT method request?
 
 isDelete ()
 Is this a DELETE method request?
 
 isTrace ()
 Is this a TRACE method request?
 
 isConnect ()
 Is this a CONNECT method request?
 
 isPatch ()
 Is this a PATCH method request?
 
 isXmlHttpRequest ()
 Is the request a Javascript XMLHttpRequest?
 
 isFlashRequest ()
 Is this a Flash request?
 
 renderRequestLine ()
 Return the formatted request line (first line) for this http request.
 
 toString ()
 
 getAllowCustomMethods ()
 
 setAllowCustomMethods ($strictMethods)
 
- Public Member Functions inherited from AbstractMessage
 setVersion ($version)
 Set the HTTP version for this object, one of 1.0 or 1.1 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11)
 
 getVersion ()
 Return the HTTP version for this request.
 
 setHeaders (Headers $headers)
 Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders())
 
 getHeaders ()
 Return the header container responsible for headers.
 
 __toString ()
 Allow PHP casting of this object.
 
- Public Member Functions inherited from Message
 setMetadata ($spec, $value=null)
 Set message metadata.
 
 getMetadata ($key=null, $default=null)
 Retrieve all metadata or a single metadatum as specified by key.
 
 setContent ($value)
 Set message content.
 
 getContent ()
 Get message content.
 
 toString ()
 
- Public Member Functions inherited from MessageInterface
 getMetadata ($key=null)
 Get metadata.
 

Additional Inherited Members

- Static Public Member Functions inherited from Request
static fromString ($string, $allowCustomMethods=true)
 A factory that produces a Request object from a well-formed Http Request string.
 
- Public Attributes inherited from Request
const METHOD_OPTIONS = 'OPTIONS'
 #@+ string METHOD constant names
 
const METHOD_GET = 'GET'
 
const METHOD_HEAD = 'HEAD'
 
const METHOD_POST = 'POST'
 
const METHOD_PUT = 'PUT'
 
const METHOD_DELETE = 'DELETE'
 
const METHOD_TRACE = 'TRACE'
 
const METHOD_CONNECT = 'CONNECT'
 
const METHOD_PATCH = 'PATCH'
 
const METHOD_PROPFIND = 'PROPFIND'
 
- Protected Member Functions inherited from Request
 mapPhpFiles ()
 Convert PHP superglobal $_FILES into more sane parameter=value structure This handles form file input with brackets (name=files[])
 
 mapPhpFileParam (&$array, $paramName, $index, $value)
 
 detectRequestUri ()
 Detect the base URI for the request.
 
 detectBaseUrl ()
 Auto-detect the base path from the request environment.
 
 detectBasePath ()
 Autodetect the base path of the request.
 
- Protected Attributes inherited from Request
 $baseUrl
 
 $basePath
 
 $requestUri
 
 $serverParams = null
 
 $envParams = null
 

Constructor & Destructor Documentation

__construct (   $method,
  $uri,
array  $headers,
array  $cookies,
array  $queryStringArguments,
array  $postParameters,
array  $uploadedFiles,
array  $serverParams 
)

Overload constructor.

This method overloads the original constructor to accept the various request metadata instead of pulling from superglobals.

Parameters
string$method
string | \Psr\Http\Message\UriInterface$uri
array$headers
array$cookies
array$queryStringArguments
array$postParameters
array$uploadedFiles
array$serverParams