Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TCallbackResponseAdapter

TComponent
   |
   --TApplicationComponent
      |
      --THttpResponseAdapter
         |
         --TCallbackResponseAdapter

TCallbackResponseAdapter alters the THttpResponse's outputs.

A TCallbackResponseWriter is used instead of the TTextWrite when createHtmlWriter is called. Each call to createHtmlWriter will create a new TCallbackResponseWriter. When flushContent() is called each instance of TCallbackResponseWriter's content is flushed.

The callback response data can be set using the ResponseData property.

Since: 3.1
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Method Summary
void
createNewHtmlWriter ( string $type, THttpResponse $response)
Returns a new instance of THtmlWriter.
void
Flushes the contents in the writers.
string
mixed
void
httpRedirect ( string $url)
Delay the redirect until we process the rest of the page.
void
setResponseData ( mixed $data)
Methods Inherited From THttpResponseAdapter
THttpResponseAdapter::createNewHtmlWriter(), THttpResponseAdapter::flushContent(), THttpResponseAdapter::getResponse(), THttpResponseAdapter::httpRedirect()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods 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()

Method Details

createNewHtmlWriter

public void createNewHtmlWriter (string $type , THttpResponse $response )

Returns a new instance of THtmlWriter.

An instance of TCallbackResponseWriter is created to hold the content.

Input
string$typewriter class name.
THttpResponse$responsehttp response handler.
Output
Exception

flushContent

public void flushContent ()

Flushes the contents in the writers.

Output
Exception

getRedirectedUrl

public string getRedirectedUrl ()

Output
string new url for callback response to redirect to.
Exception

getResponseData

public mixed getResponseData ()

Output
mixed callback response data.
Exception

httpRedirect

public void httpRedirect (string $url )

Delay the redirect until we process the rest of the page.

Input
string$urlnew url to redirect to.
Output
Exception

setResponseData

public void setResponseData (mixed $data )

Input
mixed$datacallback response data.
Output
Exception