## Class TJsonResponse

Description

TJsonResponse Class

TJsonResponse is the base class for all JSON response provider classes.

Derived classes must implement getJsonContent() to return an object or literals to be converted to JSON format. The response will be empty if the returned content is null.

- abstract:
- since: 3.1
- version: $Id: TJsonService.php 2574 2008-11-30 23:09:51Z carlgmathisen $
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/Services/TJsonService.php (line 137)

    TComponent
       |
       --TApplicationComponent
          |
          --TJsonResponse

Method Summary
string getID ()
object json getJsonContent ()
void init (TXmlElement $config)
void setID (string $value)
Methods
getID (line 152)

- return: ID of this response
- access: public

string getID ()
getJsonContent (line 168)

- return: response content, null to suppress output.
- access: public
- abstract:

object json getJsonContent ()
init (line 145)

Initializes the feed.

- access: public

void init (TXmlElement $config)

- TXmlElement $config: configurations specified in TJsonService.

setID (line 160)

- access: public

void setID (string $value)

- string $value: ID of this response

#### 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:18:01 +0000 by phpDocumentor 1.3.0RC4