1005. Class

1005.1. Zend\Http\Request

HTTP Request

1005.1.1. Methods

1005.1.1.1. fromString

fromString()

A factory that produces a Request object from a well-formed Http Request string

Parameters:string
Return type:Request
Throws :ExceptionInvalidArgumentException

1005.1.1.2. setMethod

setMethod()

Set the method for this request

Parameters:string
Return type:Request
Throws :ExceptionInvalidArgumentException

1005.1.1.3. getMethod

getMethod()

Return the method for this request

Return type:string

1005.1.1.4. setUri

setUri()

Set the URI/URL for this request, this can be a string or an instance of ZendUriHttp

Parameters:string|HttpUri
Return type:Request

1005.1.1.5. getUri

getUri()

Return the URI for this request object

Return type:HttpUri

1005.1.1.6. getUriString

getUriString()

Return the URI for this request object as a string

Return type:string

1005.1.1.7. setQuery

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())

Parameters:ZendStdlibParametersInterface
Return type:Request

1005.1.1.8. getQuery

getQuery()

Return the parameter container responsible for query parameters or a single query parameter

Parameters:
  • string|null – Parameter name to retrieve, or null to get the whole container.
  • mixed|null – Default value to use when the parameter is missing.
Return type:

ZendStdlibParametersInterface|mixed

1005.1.1.9. setPost

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())

Parameters:ZendStdlibParametersInterface
Return type:Request

1005.1.1.10. getPost

getPost()

Return the parameter container responsible for post parameters or a single post parameter.

Parameters:
  • string|null – Parameter name to retrieve, or null to get the whole container.
  • mixed|null – Default value to use when the parameter is missing.
Return type:

ZendStdlibParametersInterface|mixed

1005.1.1.11. getCookie

getCookie()

Return the Cookie header, this is the same as calling $request->getHeaders()->get(‘Cookie’);

Return type:HeaderCookie

1005.1.1.12. setFiles

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())

Parameters:ParametersInterface
Return type:Request

1005.1.1.13. getFiles

getFiles()

Return the parameter container responsible for file parameters or a single file.

Parameters:
  • string|null – Parameter name to retrieve, or null to get the whole container.
  • mixed|null – Default value to use when the parameter is missing.
Return type:

ParametersInterface|mixed

1005.1.1.14. getHeaders

getHeaders()

Return the header container responsible for headers or all headers of a certain name/type

Parameters:
  • string|null – Header name to retrieve, or null to get the whole container.
  • mixed|null – Default value to use when the requested header is missing.
Return type:

ZendHttpHeaders|bool|ZendHttpHeaderHeaderInterface|ArrayIterator

1005.1.1.15. getHeader

getHeader()

Get all headers of a certain name/type.

Parameters:
  • string|null – Header name to retrieve, or null to get the whole container.
  • mixed|null – Default value to use when the requested header is missing.
Return type:

ZendHttpHeaders|bool|ZendHttpHeaderHeaderInterface|ArrayIterator

1005.1.1.16. isOptions

isOptions()

Is this an OPTIONS method request?

Return type:bool

1005.1.1.17. isPropFind

isPropFind()

Is this a PROPFIND method request?

Return type:bool

1005.1.1.18. isGet

isGet()

Is this a GET method request?

Return type:bool

1005.1.1.19. isHead

isHead()

Is this a HEAD method request?

Return type:bool

1005.1.1.20. isPost

isPost()

Is this a POST method request?

Return type:bool

1005.1.1.21. isPut

isPut()

Is this a PUT method request?

Return type:bool

1005.1.1.22. isDelete

isDelete()

Is this a DELETE method request?

Return type:bool

1005.1.1.23. isTrace

isTrace()

Is this a TRACE method request?

Return type:bool

1005.1.1.24. isConnect

isConnect()

Is this a CONNECT method request?

Return type:bool

1005.1.1.25. isPatch

isPatch()

Is this a PATCH method request?

Return type:bool

1005.1.1.26. isXmlHttpRequest

isXmlHttpRequest()

Is the request a Javascript XMLHttpRequest?

Should work with Prototype/Script.aculo.us, possibly others.

Return type:bool

1005.1.1.27. isFlashRequest

isFlashRequest()

Is this a Flash request?

Return type:bool

1005.1.1.28. renderRequestLine

renderRequestLine()

Return the formatted request line (first line) for this http request

Return type:string

1005.1.1.29. toString

toString()

@return string

1005.1.2. Constants

1005.1.2.1. METHOD_OPTIONS

1005.1.2.2. METHOD_GET

1005.1.2.3. METHOD_HEAD

1005.1.2.4. METHOD_POST

1005.1.2.5. METHOD_PUT

1005.1.2.6. METHOD_DELETE

1005.1.2.7. METHOD_TRACE

1005.1.2.8. METHOD_CONNECT

1005.1.2.9. METHOD_PATCH

1005.1.2.10. METHOD_PROPFIND