## Class THttpResponseAdapter

Description

THttpResponseAdapter class.

THttpResponseAdapter allows the base http response class to change behavior without change the class hierarchy.

- since: 3.0
- version: $Id$
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/THttpResponseAdapter.php (line 24)

    TComponent
       |
       --TApplicationComponent
          |
          --THttpResponseAdapter

Direct descendents

Class | Description
--- | ---
TCallbackResponseAdapter | TCallbackResponseAdapter alters the THttpResponse's outputs.

Method Summary
THttpResponseAdapter __construct (THttpResponse $response)
void createNewHtmlWriter (string $type, ITextWriter $writer)
void flushContent ()
THttpResponse getResponse ()
void httpRedirect (string $url)
Methods
Constructor __construct (line 35)

Constructor. Attach a response to be adapted.

- access: public

THttpResponseAdapter __construct (THttpResponse $response)

- THttpResponse $response: the response object the adapter is to attach to.

createNewHtmlWriter (line 72)

This method is invoked when a new HtmlWriter needs to be created.

Default implementation calls the attached response createNewHtmlWriter method.

- access: public

void createNewHtmlWriter (string $type, ITextWriter $writer)

- string $type: type of the HTML writer to be created.
- ITextWriter $writer: the writer responsible for holding the content.

Redefined in descendants as:

- TCallbackResponseAdapter::createNewHtmlWriter() : Returns a new instance of THtmlWriter.

flushContent (line 52)

This method is invoked when the response flushes the content and headers.

Default implementation calls the attached response flushContent method.

- access: public

void flushContent ()

Redefined in descendants as:

- TCallbackResponseAdapter::flushContent() : Flushes the contents in the writers.

getResponse (line 43)

- return: the response object adapted.
- access: public

THttpResponse getResponse ()

Redefinition of:

TApplicationComponent::getResponse()

httpRedirect (line 61)

This method is invoked when the response is to redirect to another page.

- access: public

void httpRedirect (string $url)

- string $url: new url to redirect to.

Redefined in descendants as:

- TCallbackResponseAdapter::httpRedirect() : Delay the redirect until we process the rest of the page.

#### Inherited Methods

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Mon, 22 Feb 2010 12:17:53 +0000 by phpDocumentor 1.3.0RC4