HTTP Response for current PHP environment

category Zend
package Zend_Http

 Methods

Allow PHP casting of this object

__toString() : string
Inherited

inherited_from \Zend\Http\AbstractMessage::__toString()
inherited_from \Zend\Http\Response::__toString()

Returns

string

contentSent()

contentSent() : bool

Returns

bool

Populate object from string

fromString(string $string) : \Zend\Http\Response
Inherited

inherited_from \Zend\Http\Response::fromString()

Parameters

$string

string

Exceptions

\Zend\Http\Exception\InvalidArgumentException

Returns

Get the body of the response

getBody() : string
Inherited

inherited_from \Zend\Http\Response::getBody()

Returns

string

Get message content

getContent() : mixed
Inherited

inherited_from \Zend\Stdlib\Message::getContent()
inherited_from \Zend\Http\AbstractMessage::getContent()
inherited_from \Zend\Http\Response::getContent()

Returns

mixed

getCookie()

getCookie() : \Zend\Http\Header\SetCookie[]
Inherited

inherited_from \Zend\Http\Response::getCookie()

Returns

Return the header container responsible for headers

getHeaders() : \Zend\Http\Headers
Inherited

inherited_from \Zend\Http\AbstractMessage::getHeaders()
inherited_from \Zend\Http\Response::getHeaders()

Returns

Get HTTP status message

getReasonPhrase() : string
Inherited

inherited_from \Zend\Http\Response::getReasonPhrase()

Returns

string

Retrieve HTTP status code

getStatusCode() : int
Inherited

inherited_from \Zend\Http\Response::getStatusCode()

Returns

int

Return the HTTP version for this response

getVersion() : string

see \Zend\Http\AbstractMessage::getVersion()

Returns

string

headersSent()

headersSent() : bool

Returns

bool

Does the status code indicate a client error?

isClientError() : bool
Inherited

inherited_from \Zend\Http\Response::isClientError()

Returns

bool

Is the request forbidden due to ACLs?

isForbidden() : bool
Inherited

inherited_from \Zend\Http\Response::isForbidden()

Returns

bool

Is the current status "informational"?

isInformational() : bool
Inherited

inherited_from \Zend\Http\Response::isInformational()

Returns

bool

Does the status code indicate the resource is not found?

isNotFound() : bool
Inherited

inherited_from \Zend\Http\Response::isNotFound()

Returns

bool

Do we have a normal, OK response?

isOk() : bool
Inherited

inherited_from \Zend\Http\Response::isOk()

Returns

bool

Do we have a redirect?

isRedirect() : bool
Inherited

inherited_from \Zend\Http\Response::isRedirect()

Returns

bool

Does the status code reflect a server error?

isServerError() : bool
Inherited

inherited_from \Zend\Http\Response::isServerError()

Returns

bool

Was the response successful?

isSuccess() : bool
Inherited

inherited_from \Zend\Http\Response::isSuccess()

Returns

bool

Render the status line header

renderStatusLine() : string
Inherited

inherited_from \Zend\Http\Response::renderStatusLine()

Returns

string

Send HTTP headers

sendHeaders() : \Zend\Http\PhpEnvironment\Response

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\Response::setContent()

Parameters

$value

mixed

Returns

Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders())

setHeaders(\Zend\Http\Headers $headers) : \Zend\Http\AbstractMessage
Inherited

see \Zend\Http\getHeaders()
inherited_from \Zend\Http\AbstractMessage::setHeaders()
inherited_from \Zend\Http\Response::setHeaders()

Parameters

Returns

setReasonPhrase()

setReasonPhrase(string $reasonPhrase) : \Zend\Http\Response
Inherited

inherited_from \Zend\Http\Response::setReasonPhrase()

Parameters

$reasonPhrase

string

Returns

Set HTTP status code and (optionally) message

setStatusCode(integer $code) : \Zend\Http\Response
Inherited

inherited_from \Zend\Http\Response::setStatusCode()

Parameters

$code

integer

Exceptions

\Zend\Http\Exception\InvalidArgumentException

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\Response::setVersion()

Parameters

$version

string

(Must be 1.0 or 1.1)

Exceptions

\Zend\Http\Exception\InvalidArgumentException

Returns

Render entire response as HTTP response string

toString() : string
Inherited

inherited_from \Zend\Http\Response::toString()

Returns

string

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

decodeChunkedBody(string $body) : string
Inherited

inherited_from \Zend\Http\Response::decodeChunkedBody()

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

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

decodeDeflate(string $body) : string
Inherited

Currently requires PHP with zlib support

inherited_from \Zend\Http\Response::decodeDeflate()

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

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

decodeGzip(string $body) : string
Inherited

Currently requires PHP with zlib support

inherited_from \Zend\Http\Response::decodeGzip()

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

Detect the current used protocol version.

detectVersion() : string

If detection failed it falls back to version 1.0.

Returns

string

 Properties

 

$content

$content : string
Inherited

inherited_from \Zend\Stdlib\Message::$$content
inherited_from \Zend\Http\AbstractMessage::$$content
inherited_from \Zend\Http\Response::$$content
 

$contentSent

$contentSent : bool

 

$headers

$headers : \Zend\Http\Headers | null
Inherited

inherited_from \Zend\Http\AbstractMessage::$$headers
inherited_from \Zend\Http\Response::$$headers
 

$headersSent

$headersSent : bool

   

<p>Null means it will be looked up from the $reasonPhrase list above</p>

$reasonPhrase : string | null
Inherited

inherited_from \Zend\Http\Response::$$reasonPhrase
 

<p>Recommended Reason Phrases</p>

$recommendedReasonPhrases : array
Inherited

inherited_from \Zend\Http\Response::$$recommendedReasonPhrases
 

<p>Status code</p>

$statusCode : int
Inherited

inherited_from \Zend\Http\Response::$$statusCode
 

The current used version (The value will be detected on getVersion)

$version : null | string

 Constants

 

STATUS_CODE_100

STATUS_CODE_100 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_100
 

STATUS_CODE_101

STATUS_CODE_101 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_101
 

STATUS_CODE_102

STATUS_CODE_102 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_102
 

STATUS_CODE_200

STATUS_CODE_200 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_200
 

STATUS_CODE_201

STATUS_CODE_201 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_201
 

STATUS_CODE_202

STATUS_CODE_202 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_202
 

STATUS_CODE_203

STATUS_CODE_203 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_203
 

STATUS_CODE_204

STATUS_CODE_204 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_204
 

STATUS_CODE_205

STATUS_CODE_205 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_205
 

STATUS_CODE_206

STATUS_CODE_206 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_206
 

STATUS_CODE_207

STATUS_CODE_207 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_207
 

STATUS_CODE_208

STATUS_CODE_208 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_208
 

STATUS_CODE_300

STATUS_CODE_300 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_300
 

STATUS_CODE_301

STATUS_CODE_301 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_301
 

STATUS_CODE_302

STATUS_CODE_302 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_302
 

STATUS_CODE_303

STATUS_CODE_303 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_303
 

STATUS_CODE_304

STATUS_CODE_304 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_304
 

STATUS_CODE_305

STATUS_CODE_305 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_305
 

STATUS_CODE_306

STATUS_CODE_306 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_306
 

STATUS_CODE_307

STATUS_CODE_307 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_307
 

STATUS_CODE_400

STATUS_CODE_400 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_400
 

STATUS_CODE_401

STATUS_CODE_401 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_401
 

STATUS_CODE_402

STATUS_CODE_402 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_402
 

STATUS_CODE_403

STATUS_CODE_403 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_403
 

STATUS_CODE_404

STATUS_CODE_404 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_404
 

STATUS_CODE_405

STATUS_CODE_405 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_405
 

STATUS_CODE_406

STATUS_CODE_406 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_406
 

STATUS_CODE_407

STATUS_CODE_407 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_407
 

STATUS_CODE_408

STATUS_CODE_408 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_408
 

STATUS_CODE_409

STATUS_CODE_409 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_409
 

STATUS_CODE_410

STATUS_CODE_410 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_410
 

STATUS_CODE_411

STATUS_CODE_411 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_411
 

STATUS_CODE_412

STATUS_CODE_412 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_412
 

STATUS_CODE_413

STATUS_CODE_413 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_413
 

STATUS_CODE_414

STATUS_CODE_414 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_414
 

STATUS_CODE_415

STATUS_CODE_415 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_415
 

STATUS_CODE_416

STATUS_CODE_416 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_416
 

STATUS_CODE_417

STATUS_CODE_417 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_417
 

STATUS_CODE_418

STATUS_CODE_418 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_418
 

STATUS_CODE_422

STATUS_CODE_422 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_422
 

STATUS_CODE_423

STATUS_CODE_423 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_423
 

STATUS_CODE_424

STATUS_CODE_424 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_424
 

STATUS_CODE_425

STATUS_CODE_425 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_425
 

STATUS_CODE_426

STATUS_CODE_426 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_426
 

STATUS_CODE_428

STATUS_CODE_428 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_428
 

STATUS_CODE_429

STATUS_CODE_429 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_429
 

STATUS_CODE_431

STATUS_CODE_431 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_431
 

STATUS_CODE_500

STATUS_CODE_500 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_500
 

STATUS_CODE_501

STATUS_CODE_501 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_501
 

STATUS_CODE_502

STATUS_CODE_502 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_502
 

STATUS_CODE_503

STATUS_CODE_503 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_503
 

STATUS_CODE_504

STATUS_CODE_504 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_504
 

STATUS_CODE_505

STATUS_CODE_505 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_505
 

STATUS_CODE_506

STATUS_CODE_506 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_506
 

STATUS_CODE_507

STATUS_CODE_507 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_507
 

STATUS_CODE_508

STATUS_CODE_508 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_508
 

STATUS_CODE_511

STATUS_CODE_511 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_511
 

STATUS_CODE_CUSTOM

STATUS_CODE_CUSTOM 
Inherited

inherited_from \Zend\Http\Response::STATUS_CODE_CUSTOM
 

VERSION_10

VERSION_10 
Inherited

inherited_from \Zend\Http\AbstractMessage::VERSION_10
inherited_from \Zend\Http\Response::VERSION_10
 

VERSION_11

VERSION_11 
Inherited

inherited_from \Zend\Http\AbstractMessage::VERSION_11
inherited_from \Zend\Http\Response::VERSION_11