PHP Class Zaphpa_Response, zaphpa

显示文件 Open project: zaphpa/zaphpa

Public Properties

Property Type Description
$chunks Ordered chunks of the output buffer *
$code

Public Methods

Method Description
__construct ( $request = null ) Public constructor *
add ( $out ) Add string to output buffer.
disableBrowserCache ( ) Send headers to instruct browser not to cache this content See http://stackoverflow.com/a/2068407
flush ( $code = null, $format = null ) : current Send output to client without ending the script
getFormat ( )
send ( $code = null, $format = null ) Flush output buffer to http client and end request
setFormat ( $format ) Set output format. Common aliases like: xml, json, html and txt are supported and automatically converted to proper HTTP content type definitions.

Private Methods

Method Description
codes ( )
sendHeaders ( ) Send entire collection of headers if they haven't already been sent

Method Details

__construct() public method

Public constructor *
public __construct ( $request = null )

add() public method

Add string to output buffer.
public add ( $out )

disableBrowserCache() public method

Send headers to instruct browser not to cache this content See http://stackoverflow.com/a/2068407
public disableBrowserCache ( )

flush() public method

@param $code HTTP response Code. Defaults to 200
public flush ( $code = null, $format = null ) : current
$format Output mime type. Defaults to request format @return current respons eobject, so you can chain method calls on a response object.
return current

getFormat() public method

public getFormat ( )

send() public method

@param $code HTTP response Code. Defaults to 200
public send ( $code = null, $format = null )
$format Output mime type. Defaults to request format

setFormat() public method

Set output format. Common aliases like: xml, json, html and txt are supported and automatically converted to proper HTTP content type definitions.
public setFormat ( $format )

Property Details

$chunks public_oe property

Ordered chunks of the output buffer *
public $chunks

$code public_oe property

public $code