mvcResponse

Contains the response to the HTTP request. The response will encapsulate whatever view data has been generated along with any headers etc.

$oResponse = new mvcResponse(mvcRequest::getInstance(), '

Hello World!

');
$oResponse->send();

Methods

public __construct($inRequest, [$inContent = null], [$inHeaders = array()])

Creates a new response

public toString()

Converts response to a string, triggering headers to be sent if not already

public __toString()

If the response is used as a string, dump the contents and headers to the requester

public send()

Sends the response to the requester

public sendHeaders()

Sends headers, if headers have not already been sent

public sendContent()

Sends only the content

public isModified()

Returns true if object has been modified

public setModified([$status = true])

Set the status of the object if it has been changed

public getRequest()

Returns $_Request

public setRequest($inRequest)

Set $_Request to $inRequest

public getHeaders()

Returns the current set of headers to be used during output

public addHeader($inType, $inValue)

Add a header to the set, will overwrite an existing header

public removeHeader($inType)

Removes the specified header from the set

public getContent()

Returns current content array

public setContent($inContent)

Sets or replaces the content response

<  1  >