HTTP Response

category Zend
package Zend_Http
link http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6

 Methods

Allow PHP casting of this object

__toString() : string
Inherited

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

Returns

string

Populate object from string

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

Parameters

$string

string

Exceptions

\Zend\Http\Exception\InvalidArgumentException

Returns

Get the body of the response

getBody() : string

Returns

string

Get message content

getContent() : mixed
Inherited

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

Returns

mixed

getCookie()

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

Return the header container responsible for headers

getHeaders() : \Zend\Http\Headers
Inherited

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

Returns

Get HTTP status message

getReasonPhrase() : string

Returns

string

Retrieve HTTP status code

getStatusCode() : int

Returns

int

Return the HTTP version for this request

getVersion() : string
Inherited

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

Returns

string

Does the status code indicate a client error?

isClientError() : bool

Returns

bool

Is the request forbidden due to ACLs?

isForbidden() : bool

Returns

bool

Is the current status "informational"?

isInformational() : bool

Returns

bool

Does the status code indicate the resource is not found?

isNotFound() : bool

Returns

bool

Do we have a normal, OK response?

isOk() : bool

Returns

bool

Do we have a redirect?

isRedirect() : bool

Returns

bool

Does the status code reflect a server error?

isServerError() : bool

Returns

bool

Was the response successful?

isSuccess() : bool

Returns

bool

Render the status line header

renderStatusLine() : string

Returns

string

Set message content

setContent(mixed $value) : \Zend\Stdlib\Message
Inherited

inherited_from \Zend\Stdlib\Message::setContent()
inherited_from \Zend\Http\AbstractMessage::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()

Parameters

Returns

setReasonPhrase()

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

Parameters

$reasonPhrase

string

Returns

Set HTTP status code and (optionally) message

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

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

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

Returns

string

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

decodeChunkedBody(string $body) : string

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

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

decodeDeflate(string $body) : string

Currently requires PHP with zlib support

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

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

decodeGzip(string $body) : string

Currently requires PHP with zlib support

Parameters

$body

string

Exceptions

\Zend\Http\Exception\RuntimeException

Returns

string

 Properties

 

$content

$content : string
Inherited

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

$headers

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

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

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

$reasonPhrase : string | null

 

<p>Recommended Reason Phrases</p>

$recommendedReasonPhrases : array

 

<p>Status code</p>

$statusCode : int

 

$version

$version : string
Inherited

inherited_from \Zend\Http\AbstractMessage::$$version

 Constants

 

STATUS_CODE_100

STATUS_CODE_100 

 

STATUS_CODE_101

STATUS_CODE_101 

 

STATUS_CODE_102

STATUS_CODE_102 

 

STATUS_CODE_200

STATUS_CODE_200 

 

STATUS_CODE_201

STATUS_CODE_201 

 

STATUS_CODE_202

STATUS_CODE_202 

 

STATUS_CODE_203

STATUS_CODE_203 

 

STATUS_CODE_204

STATUS_CODE_204 

 

STATUS_CODE_205

STATUS_CODE_205 

 

STATUS_CODE_206

STATUS_CODE_206 

 

STATUS_CODE_207

STATUS_CODE_207 

 

STATUS_CODE_208

STATUS_CODE_208 

 

STATUS_CODE_300

STATUS_CODE_300 

 

STATUS_CODE_301

STATUS_CODE_301 

 

STATUS_CODE_302

STATUS_CODE_302 

 

STATUS_CODE_303

STATUS_CODE_303 

 

STATUS_CODE_304

STATUS_CODE_304 

 

STATUS_CODE_305

STATUS_CODE_305 

 

STATUS_CODE_306

STATUS_CODE_306 

 

STATUS_CODE_307

STATUS_CODE_307 

 

STATUS_CODE_400

STATUS_CODE_400 

 

STATUS_CODE_401

STATUS_CODE_401 

 

STATUS_CODE_402

STATUS_CODE_402 

 

STATUS_CODE_403

STATUS_CODE_403 

 

STATUS_CODE_404

STATUS_CODE_404 

 

STATUS_CODE_405

STATUS_CODE_405 

 

STATUS_CODE_406

STATUS_CODE_406 

 

STATUS_CODE_407

STATUS_CODE_407 

 

STATUS_CODE_408

STATUS_CODE_408 

 

STATUS_CODE_409

STATUS_CODE_409 

 

STATUS_CODE_410

STATUS_CODE_410 

 

STATUS_CODE_411

STATUS_CODE_411 

 

STATUS_CODE_412

STATUS_CODE_412 

 

STATUS_CODE_413

STATUS_CODE_413 

 

STATUS_CODE_414

STATUS_CODE_414 

 

STATUS_CODE_415

STATUS_CODE_415 

 

STATUS_CODE_416

STATUS_CODE_416 

 

STATUS_CODE_417

STATUS_CODE_417 

 

STATUS_CODE_418

STATUS_CODE_418 

 

STATUS_CODE_422

STATUS_CODE_422 

 

STATUS_CODE_423

STATUS_CODE_423 

 

STATUS_CODE_424

STATUS_CODE_424 

 

STATUS_CODE_425

STATUS_CODE_425 

 

STATUS_CODE_426

STATUS_CODE_426 

 

STATUS_CODE_428

STATUS_CODE_428 

 

STATUS_CODE_429

STATUS_CODE_429 

 

STATUS_CODE_431

STATUS_CODE_431 

 

STATUS_CODE_500

STATUS_CODE_500 

 

STATUS_CODE_501

STATUS_CODE_501 

 

STATUS_CODE_502

STATUS_CODE_502 

 

STATUS_CODE_503

STATUS_CODE_503 

 

STATUS_CODE_504

STATUS_CODE_504 

 

STATUS_CODE_505

STATUS_CODE_505 

 

STATUS_CODE_506

STATUS_CODE_506 

 

STATUS_CODE_507

STATUS_CODE_507 

 

STATUS_CODE_508

STATUS_CODE_508 

 

STATUS_CODE_511

STATUS_CODE_511 

 

STATUS_CODE_CUSTOM

STATUS_CODE_CUSTOM 

 

VERSION_10

VERSION_10 
Inherited

inherited_from \Zend\Http\AbstractMessage::VERSION_10
 

VERSION_11

VERSION_11 
Inherited

inherited_from \Zend\Http\AbstractMessage::VERSION_11