IResponse
extends
IMessage, IResponse
in
Tags
Table of Contents
Constants
- STATUS_CODE_ACCEPTED = 202
- STATUS_CODE_BAD_GATEWAY = 502
- STATUS_CODE_BAD_REQUEST = 400
- STATUS_CODE_BANDWIDTH_LIMIT_EXCEEDED = 509
- STATUS_CODE_CONFLICT = 409
- STATUS_CODE_CONTINUE = 100
- STATUS_CODE_CREATED = 201
- STATUS_CODE_EXPECTATION_FAILED = 417
- STATUS_CODE_FAILED_DEPENDENCY = 424
- STATUS_CODE_FORBIDDEN = 403
- STATUS_CODE_FOUND = 302
- STATUS_CODE_GATEWAY_TIMEOUT = 504
- STATUS_CODE_GONE = 410
- STATUS_CODE_HTTP_VERSION_NOT_SUPPORTED = 505
- STATUS_CODE_IM_A_TEA_POT = 418
- STATUS_CODE_INSUFFICIENT_STORAGE = 507
- STATUS_CODE_INTERNAL_SERVER_ERROR = 500
- STATUS_CODE_LENGTH_REQUIRED = 411
- STATUS_CODE_LOCKED = 423
- STATUS_CODE_LOOP_DETECTED = 508
- STATUS_CODE_METHOD_NOT_ALLOWED = 405
- STATUS_CODE_MISDIRECTED_REQUEST = 421
- STATUS_CODE_MOVED_PERMANENTLY = 301
- STATUS_CODE_MULTI_STATUS = 207
- STATUS_CODE_MULTIPLE_CHOICES = 300
- STATUS_CODE_NO_CONTENT = 204
- STATUS_CODE_NON_AUTHORATATIVE_INFORMATION = 203
- STATUS_CODE_NOT_ACCEPTABLE = 406
- STATUS_CODE_NOT_EXTENDED = 510
- STATUS_CODE_NOT_FOUND = 404
- STATUS_CODE_NOT_IMPLEMENTED = 501
- STATUS_CODE_NOT_MODIFIED = 304
- STATUS_CODE_OK = 200
- STATUS_CODE_PARTIAL_CONTENT = 206
- STATUS_CODE_PAYLOAD_TOO_LARGE = 413
- STATUS_CODE_PAYMENT_REQUIRED = 402
- STATUS_CODE_PRECONDITION_FAILED = 412
- STATUS_CODE_PRECONDITION_REQUIRED = 428
- STATUS_CODE_PROCESSING = 102
- STATUS_CODE_PROXY_AUTHENTICATION_REQUIRED = 407
- STATUS_CODE_RANGE_NOT_SATISFIABLE = 416
- STATUS_CODE_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
- STATUS_CODE_REQUEST_TIMEOUT = 408
- STATUS_CODE_RESET_CONTENT = 205
- STATUS_CODE_SEE_OTHER = 303
- STATUS_CODE_SERVICE_UNAVAILABLE = 503
- STATUS_CODE_SWITCH_PROXY = 306
- STATUS_CODE_SWITCHING_PROTOCOLS = 101
- STATUS_CODE_TEMPORARY_REDIRECT = 307
- STATUS_CODE_TOO_MANY_REQUESTS = 429
- STATUS_CODE_UNAUTHORIZED = 401
- STATUS_CODE_UNAVAILABLE_FOR_LEGAL_REASONS = 451
- STATUS_CODE_UNPROCESSABLE_ENTITY = 422
- STATUS_CODE_UNSUPPORTED_MEDIA_TYPE = 415
- STATUS_CODE_UPGRADE_REQUIRED = 426
- STATUS_CODE_URI_TOO_LONG = 414
- STATUS_CODE_USE_PROXY = 305
- STATUS_CODE_VARIANT_ALSO_NEGOTIATES = 506
- STATUS_NETWORD_AUTHENTICATION_REQUIRED = 511
Methods
- getBody() : string|null
- Gets the body of the message. String if it has been set / initialized, null otherwise.
- getProtocolVersion() : string
- getReasonPhrase() : string
- getStatusCode() : int
- Gets the response status code. The status code is a 3-digit integer result code of the server's attempt to understand and satisfy the request.
- setBody() : mixed
- Sets the body of the message.
- setHeader() : mixed
- Sets an HTTP header within this response.
Constants
STATUS_CODE_ACCEPTED
public
int
STATUS_CODE_ACCEPTED
= 202
STATUS_CODE_BAD_GATEWAY
public
int
STATUS_CODE_BAD_GATEWAY
= 502
STATUS_CODE_BAD_REQUEST
public
int
STATUS_CODE_BAD_REQUEST
= 400
STATUS_CODE_BANDWIDTH_LIMIT_EXCEEDED
public
int
STATUS_CODE_BANDWIDTH_LIMIT_EXCEEDED
= 509
STATUS_CODE_CONFLICT
public
int
STATUS_CODE_CONFLICT
= 409
STATUS_CODE_CONTINUE
public
int
STATUS_CODE_CONTINUE
= 100
STATUS_CODE_CREATED
public
int
STATUS_CODE_CREATED
= 201
STATUS_CODE_EXPECTATION_FAILED
public
int
STATUS_CODE_EXPECTATION_FAILED
= 417
STATUS_CODE_FAILED_DEPENDENCY
public
int
STATUS_CODE_FAILED_DEPENDENCY
= 424
STATUS_CODE_FORBIDDEN
public
int
STATUS_CODE_FORBIDDEN
= 403
STATUS_CODE_FOUND
public
int
STATUS_CODE_FOUND
= 302
STATUS_CODE_GATEWAY_TIMEOUT
public
int
STATUS_CODE_GATEWAY_TIMEOUT
= 504
STATUS_CODE_GONE
public
int
STATUS_CODE_GONE
= 410
STATUS_CODE_HTTP_VERSION_NOT_SUPPORTED
public
int
STATUS_CODE_HTTP_VERSION_NOT_SUPPORTED
= 505
STATUS_CODE_IM_A_TEA_POT
public
int
STATUS_CODE_IM_A_TEA_POT
= 418
STATUS_CODE_INSUFFICIENT_STORAGE
public
int
STATUS_CODE_INSUFFICIENT_STORAGE
= 507
STATUS_CODE_INTERNAL_SERVER_ERROR
public
int
STATUS_CODE_INTERNAL_SERVER_ERROR
= 500
STATUS_CODE_LENGTH_REQUIRED
public
int
STATUS_CODE_LENGTH_REQUIRED
= 411
STATUS_CODE_LOCKED
public
int
STATUS_CODE_LOCKED
= 423
STATUS_CODE_LOOP_DETECTED
public
int
STATUS_CODE_LOOP_DETECTED
= 508
STATUS_CODE_METHOD_NOT_ALLOWED
public
int
STATUS_CODE_METHOD_NOT_ALLOWED
= 405
STATUS_CODE_MISDIRECTED_REQUEST
public
int
STATUS_CODE_MISDIRECTED_REQUEST
= 421
STATUS_CODE_MOVED_PERMANENTLY
public
int
STATUS_CODE_MOVED_PERMANENTLY
= 301
STATUS_CODE_MULTI_STATUS
public
int
STATUS_CODE_MULTI_STATUS
= 207
STATUS_CODE_MULTIPLE_CHOICES
public
int
STATUS_CODE_MULTIPLE_CHOICES
= 300
STATUS_CODE_NO_CONTENT
public
int
STATUS_CODE_NO_CONTENT
= 204
STATUS_CODE_NON_AUTHORATATIVE_INFORMATION
public
int
STATUS_CODE_NON_AUTHORATATIVE_INFORMATION
= 203
STATUS_CODE_NOT_ACCEPTABLE
public
int
STATUS_CODE_NOT_ACCEPTABLE
= 406
STATUS_CODE_NOT_EXTENDED
public
int
STATUS_CODE_NOT_EXTENDED
= 510
STATUS_CODE_NOT_FOUND
public
int
STATUS_CODE_NOT_FOUND
= 404
STATUS_CODE_NOT_IMPLEMENTED
public
int
STATUS_CODE_NOT_IMPLEMENTED
= 501
STATUS_CODE_NOT_MODIFIED
public
int
STATUS_CODE_NOT_MODIFIED
= 304
STATUS_CODE_OK
public
int
STATUS_CODE_OK
= 200
STATUS_CODE_PARTIAL_CONTENT
public
int
STATUS_CODE_PARTIAL_CONTENT
= 206
STATUS_CODE_PAYLOAD_TOO_LARGE
public
int
STATUS_CODE_PAYLOAD_TOO_LARGE
= 413
STATUS_CODE_PAYMENT_REQUIRED
public
int
STATUS_CODE_PAYMENT_REQUIRED
= 402
STATUS_CODE_PRECONDITION_FAILED
public
int
STATUS_CODE_PRECONDITION_FAILED
= 412
STATUS_CODE_PRECONDITION_REQUIRED
public
int
STATUS_CODE_PRECONDITION_REQUIRED
= 428
STATUS_CODE_PROCESSING
public
int
STATUS_CODE_PROCESSING
= 102
STATUS_CODE_PROXY_AUTHENTICATION_REQUIRED
public
int
STATUS_CODE_PROXY_AUTHENTICATION_REQUIRED
= 407
STATUS_CODE_RANGE_NOT_SATISFIABLE
public
int
STATUS_CODE_RANGE_NOT_SATISFIABLE
= 416
STATUS_CODE_REQUEST_HEADER_FIELDS_TOO_LARGE
public
int
STATUS_CODE_REQUEST_HEADER_FIELDS_TOO_LARGE
= 431
STATUS_CODE_REQUEST_TIMEOUT
public
int
STATUS_CODE_REQUEST_TIMEOUT
= 408
STATUS_CODE_RESET_CONTENT
public
int
STATUS_CODE_RESET_CONTENT
= 205
STATUS_CODE_SEE_OTHER
public
int
STATUS_CODE_SEE_OTHER
= 303
STATUS_CODE_SERVICE_UNAVAILABLE
public
int
STATUS_CODE_SERVICE_UNAVAILABLE
= 503
STATUS_CODE_SWITCH_PROXY
public
int
STATUS_CODE_SWITCH_PROXY
= 306
STATUS_CODE_SWITCHING_PROTOCOLS
public
int
STATUS_CODE_SWITCHING_PROTOCOLS
= 101
STATUS_CODE_TEMPORARY_REDIRECT
public
int
STATUS_CODE_TEMPORARY_REDIRECT
= 307
STATUS_CODE_TOO_MANY_REQUESTS
public
int
STATUS_CODE_TOO_MANY_REQUESTS
= 429
STATUS_CODE_UNAUTHORIZED
public
int
STATUS_CODE_UNAUTHORIZED
= 401
STATUS_CODE_UNAVAILABLE_FOR_LEGAL_REASONS
public
int
STATUS_CODE_UNAVAILABLE_FOR_LEGAL_REASONS
= 451
STATUS_CODE_UNPROCESSABLE_ENTITY
public
int
STATUS_CODE_UNPROCESSABLE_ENTITY
= 422
STATUS_CODE_UNSUPPORTED_MEDIA_TYPE
public
int
STATUS_CODE_UNSUPPORTED_MEDIA_TYPE
= 415
STATUS_CODE_UPGRADE_REQUIRED
public
int
STATUS_CODE_UPGRADE_REQUIRED
= 426
STATUS_CODE_URI_TOO_LONG
public
int
STATUS_CODE_URI_TOO_LONG
= 414
STATUS_CODE_USE_PROXY
public
int
STATUS_CODE_USE_PROXY
= 305
STATUS_CODE_VARIANT_ALSO_NEGOTIATES
public
int
STATUS_CODE_VARIANT_ALSO_NEGOTIATES
= 506
STATUS_NETWORD_AUTHENTICATION_REQUIRED
public
int
STATUS_NETWORD_AUTHENTICATION_REQUIRED
= 511
Methods
getBody()
Gets the body of the message. String if it has been set / initialized, null otherwise.
public
getBody() : string|null
Return values
string|nullgetProtocolVersion()
public
getProtocolVersion() : string
Return values
stringgetReasonPhrase()
public
getReasonPhrase() : string
Return values
stringgetStatusCode()
Gets the response status code. The status code is a 3-digit integer result code of the server's attempt to understand and satisfy the request.
public
getStatusCode() : int
Tags
Return values
intsetBody()
Sets the body of the message.
public
setBody(string $body) : mixed
Parameters
- $body : string
setHeader()
Sets an HTTP header within this response.
public
setHeader(string $header_name, string $header_value) : mixed
Parameters
- $header_name : string
-
The name of the header to set
- $header_value : string
-
The value of the header to set