Abstract Class Zend_Controller_Response_Abstract

Description

Zend_Controller_Response_Abstract

Base class for Zend_Controller responses

Located in /Zend/Controller/Response/Abstract.php (line 32)


	
			
Direct descendents
Class Description
 class Zend_Controller_Response_Cli Zend_Controller_Response_Cli
 class Zend_Controller_Response_Http Zend_Controller_Response_Http
Variable Summary
Method Summary
Variables
array $_body = array() (line 38)

Body content

  • access: protected
Exception $_exceptions = array() (line 44)

Exception stack

  • access: protected
array $_headers = array() (line 50)

Array of headers. Each header is an array with keys 'name' and 'value'

  • access: protected
array $_headersRaw = array() (line 56)

Array of raw headers. Each header is a single string, the entire header to emit

  • access: protected
int $_httpResponseCode = 200 (line 63)

HTTP response code to use in headers

  • access: protected
boolean $_renderExceptions = false (line 69)

Whether or not to render exceptions; off by default

  • access: protected
Methods
appendBody (line 269)

Append content to the body content

  • access: public
Zend_Controller_Response_Abstract appendBody (string $content)
  • string $content
clearAllHeaders (line 183)

Clear all headers, normal and raw

  • access: public
clearHeaders (line 136)

Clear headers

  • access: public
clearRawHeaders (line 172)

Clear all setRawHeader()

  • access: public
getBody (line 282)

Return the body content

  • access: public
string|array getBody ([boolean $asArray = false])
  • boolean $asArray: Whether or not to return the body content as an array of strings or as a single string; defaults to false
getException (line 322)

Retrieve the exception stack

  • access: public
array getException ()
getHeaders (line 126)

Return array of headers; see $_headers for format

  • access: public
array getHeaders ()
getHttpResponseCode (line 211)

Retrieve HTTP response code

  • access: public
int getHttpResponseCode ()
getRawHeaders (line 162)

Retrieve all setRawHeader()

  • access: public
array getRawHeaders ()
isException (line 332)

Has an exception been registered with the response?

  • access: public
boolean isException ()
outputBody (line 298)

Echo the body segments

  • access: public
void outputBody ()
renderExceptions (line 346)

Whether or not to render exceptions (off by default)

If called with no arguments or a null argument, returns the value of the flag; otherwise, sets it and returns the current value.

  • access: public
boolean renderExceptions ([boolean $flag = null])
  • boolean $flag: Optional
sendHeaders (line 224)

Send all headers

Sends any headers specified. If an HTTP response code has been specified, it is sent with the first header.

  • access: public
sendResponse (line 361)

Send the response, including all headers, rendering exceptions if so requested.

  • access: public
void sendResponse ()
setBody (line 257)

Set body content

If body content already defined, this will replace it.

  • access: public
Zend_Controller_Response_Abstract setBody (string $content)
  • string $content
setException (line 311)

Register an exception with the response

  • access: public
Zend_Controller_Response_Abstract setException ( $e)
  • Exception $e
setHeader (line 82)

Set a header

If $replace is true, replaces any headers already defined with that $name.

  • access: public
Zend_Controller_Response_Abstract setHeader (string $name, string $value, [boolean $replace = false])
  • string $name
  • string $value
  • boolean $replace
setHttpResponseCode (line 195)

Set HTTP response code to use with headers

  • access: public
Zend_Controller_Response_Abstract setHttpResponseCode (int $code)
  • int $code
setRawHeader (line 151)

Set raw HTTP header

Allows setting non key => value headers, such as status codes

  • access: public
Zend_Controller_Response_Abstract setRawHeader (string $value)
  • string $value
setRedirect (line 113)

Set redirect URL

Sets Location header and response code. Forces replacement of any prior redirects.

  • access: public
Zend_Controller_Response_Abstract setRedirect (string $url, [int $code = 302])
  • string $url
  • int $code
__toString (line 385)

Magic __toString functionality

Proxies to sendResponse() and returns response value as string using output buffering.

  • access: public
string __toString ()

Redefined in descendants as:

Documentation generated on Thu, 18 Jan 2007 09:52:01 -0800 by phpDocumentor 1.3.1