## Class TApplicationComponent

Description

TApplicationComponent class

TApplicationComponent is the base class for all components that are application-related, such as controls, modules, services, etc.

TApplicationComponent mainly defines a few properties that are shortcuts to some commonly used methods. The Application property gives the application instance that this component belongs to; Service gives the current running service; Request, Response and Session return the request and response modules, respectively; And User gives the current user instance.

Besides, TApplicationComponent defines two shortcut methods for publishing private files: publishAsset and publishFilePath.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /TApplicationComponent.php (line 35)

    TComponent
       |
       --TApplicationComponent

Direct descendents

Class | Description
--- | ---
TModule | TModule class.
TService | TService class.
TLogRoute | TLogRoute class.
THttpRequest | THttpRequest class
THttpSession | THttpSession class
TClientScriptManager | TClientScriptManager class.
TControl | TControl class
TControlAdapter | TControlAdapter class
THtmlWriter | THtmlWriter class
TPageStatePersister | TPageStatePersister class
TTemplate | TTemplate implements PRADO template parsing logic.
TTheme | TTheme class
TDataGridColumn | TDataGridColumn class

Method Summary
TApplication getApplication ()
THttpRequest getRequest ()
THttpResponse getResponse ()
IService getService ()
THttpSession getSession ()
IUser getUser ()
string publishAsset (string $assetPath)
string publishFilePath (string $fullPath)
Methods
getApplication (line 40)

- return: current application instance
- access: public

TApplication getApplication ()
getRequest (line 56)

- return: the current user request
- access: public

THttpRequest getRequest ()
getResponse (line 64)

- return: the response
- access: public

THttpResponse getResponse ()
getService (line 48)

- return: the current service
- access: public

IService getService ()
getSession (line 72)

- return: user session
- access: public

THttpSession getSession ()
getUser (line 80)

- return: user
- access: public

IUser getUser ()

Redefined in descendants as:

- TUserManager::getUser() : Returns a user instance given the user name.

publishAsset (line 93)

Publishes a private asset and gets its URL.

This method will publish a private asset (file or directory) and gets the URL to the asset. Note, if the asset refers to a directory, all contents under that directory will be published.

- return: URL to the asset path.
- access: public

string publishAsset (string $assetPath)

- string $assetPath: path of the asset that is relative to the directory containing the control class file.

publishFilePath (line 105)

Publishes a file or directory and returns its URL.

- return: URL to the published file or directory
- access: public

string publishFilePath (string $fullPath)

- string $fullPath: absolute path of the file or directory to be published

Redefined in descendants as:

- TAssetManager::publishFilePath() : Publishes a file or a directory (recursively).

#### Inherited Methods

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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, 01 May 2006 23:02:44 -0400 by phpDocumentor 1.3.0RC4