1007. Class

1007.1. Zend\Http\Response

HTTP Response

1007.1.1. Methods

1007.1.1.1. fromString

fromString()

Populate object from string

Parameters:string
Return type:Response
Throws :ExceptionInvalidArgumentException

1007.1.1.2. getCookie

getCookie()

@return HeaderSetCookie[]

1007.1.1.3. setStatusCode

setStatusCode()

Set HTTP status code and (optionally) message

Parameters:integer
Throws ExceptionInvalidArgumentException:
 
Return type:Response

1007.1.1.4. getStatusCode

getStatusCode()

Retrieve HTTP status code

Return type:int

1007.1.1.5. setReasonPhrase

setReasonPhrase()

@param string $reasonPhrase

Return type:Response

1007.1.1.6. getReasonPhrase

getReasonPhrase()

Get HTTP status message

Return type:string

1007.1.1.7. getBody

getBody()

Get the body of the response

Return type:string

1007.1.1.8. isClientError

isClientError()

Does the status code indicate a client error?

Return type:bool

1007.1.1.9. isForbidden

isForbidden()

Is the request forbidden due to ACLs?

Return type:bool

1007.1.1.10. isInformational

isInformational()

Is the current status “informational”?

Return type:bool

1007.1.1.11. isNotFound

isNotFound()

Does the status code indicate the resource is not found?

Return type:bool

1007.1.1.12. isOk

isOk()

Do we have a normal, OK response?

Return type:bool

1007.1.1.13. isServerError

isServerError()

Does the status code reflect a server error?

Return type:bool

1007.1.1.14. isRedirect

isRedirect()

Do we have a redirect?

Return type:bool

1007.1.1.15. isSuccess

isSuccess()

Was the response successful?

Return type:bool

1007.1.1.16. renderStatusLine

renderStatusLine()

Render the status line header

Return type:string

1007.1.1.17. toString

toString()

Render entire response as HTTP response string

Return type:string

1007.1.1.18. decodeChunkedBody

decodeChunkedBody()

Decode a “chunked” transfer-encoded body and return the decoded text

Parameters:string
Return type:string
Throws :ExceptionRuntimeException

1007.1.1.19. decodeGzip

decodeGzip()

Decode a gzip encoded message (when Content-encoding = gzip)

Currently requires PHP with zlib support

Parameters:string
Return type:string
Throws :ExceptionRuntimeException

1007.1.1.20. decodeDeflate

decodeDeflate()

Decode a zlib deflated message (when Content-encoding = deflate)

Currently requires PHP with zlib support

Parameters:string
Return type:string
Throws :ExceptionRuntimeException

1007.1.2. Constants

1007.1.2.1. STATUS_CODE_CUSTOM

1007.1.2.2. STATUS_CODE_100

1007.1.2.3. STATUS_CODE_101

1007.1.2.4. STATUS_CODE_102

1007.1.2.5. STATUS_CODE_200

1007.1.2.6. STATUS_CODE_201

1007.1.2.7. STATUS_CODE_202

1007.1.2.8. STATUS_CODE_203

1007.1.2.9. STATUS_CODE_204

1007.1.2.10. STATUS_CODE_205

1007.1.2.11. STATUS_CODE_206

1007.1.2.12. STATUS_CODE_207

1007.1.2.13. STATUS_CODE_208

1007.1.2.14. STATUS_CODE_300

1007.1.2.15. STATUS_CODE_301

1007.1.2.16. STATUS_CODE_302

1007.1.2.17. STATUS_CODE_303

1007.1.2.18. STATUS_CODE_304

1007.1.2.19. STATUS_CODE_305

1007.1.2.20. STATUS_CODE_306

1007.1.2.21. STATUS_CODE_307

1007.1.2.22. STATUS_CODE_400

1007.1.2.23. STATUS_CODE_401

1007.1.2.24. STATUS_CODE_402

1007.1.2.25. STATUS_CODE_403

1007.1.2.26. STATUS_CODE_404

1007.1.2.27. STATUS_CODE_405

1007.1.2.28. STATUS_CODE_406

1007.1.2.29. STATUS_CODE_407

1007.1.2.30. STATUS_CODE_408

1007.1.2.31. STATUS_CODE_409

1007.1.2.32. STATUS_CODE_410

1007.1.2.33. STATUS_CODE_411

1007.1.2.34. STATUS_CODE_412

1007.1.2.35. STATUS_CODE_413

1007.1.2.36. STATUS_CODE_414

1007.1.2.37. STATUS_CODE_415

1007.1.2.38. STATUS_CODE_416

1007.1.2.39. STATUS_CODE_417

1007.1.2.40. STATUS_CODE_418

1007.1.2.41. STATUS_CODE_422

1007.1.2.42. STATUS_CODE_423

1007.1.2.43. STATUS_CODE_424

1007.1.2.44. STATUS_CODE_425

1007.1.2.45. STATUS_CODE_426

1007.1.2.46. STATUS_CODE_428

1007.1.2.47. STATUS_CODE_429

1007.1.2.48. STATUS_CODE_431

1007.1.2.49. STATUS_CODE_500

1007.1.2.50. STATUS_CODE_501

1007.1.2.51. STATUS_CODE_502

1007.1.2.52. STATUS_CODE_503

1007.1.2.53. STATUS_CODE_504

1007.1.2.54. STATUS_CODE_505

1007.1.2.55. STATUS_CODE_506

1007.1.2.56. STATUS_CODE_507

1007.1.2.57. STATUS_CODE_508

1007.1.2.58. STATUS_CODE_511

Project Versions

Table Of Contents

Previous topic

1006. Function

Next topic

1008. Function

This Page