PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TApplicationComponent

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 getApplication Application property gives the application instance that this component belongs to; getService Service gives the current running service; getRequest Request, getResponse Response and getSession Session return the request and response modules, respectively; And getUser User gives the current user instance.

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

TComponent
Extended by TApplicationComponent

Direct known subclasses

TCallbackClientScript, TClientScriptManager, TLogRoute, TModule, TRpcClient, TService, TSoapServer, TTemplate, TTheme, TControl, TControlAdapter, TDataGridColumn, THtmlWriter, THttpRequest, THttpResponseAdapter, THttpSession, TJsonResponse

Indirect known subclasses

TAccordion, TAccordionView, TActiveCustomValidator, TErrorHandler, TEventTriggeredCallback, TExpression, TFeedService, TFileLogRoute, TFileUpload, TFirebugLogRoute, TFirePhpLogRoute, TFlushOutput, TForm, TActiveDataGrid, TGlobalization, TGlobalizationAutoDetect, THead, THeader1, THeader2, THeader3, THeader4, THeader5, THeader6, THiddenField, TActiveDataGridPager, THtmlArea, THtmlArea4, THtmlElement, THttpResponse, THyperLink, THyperLinkColumn, TI18NControl, TImage, TImageButton, TImageMap, TActiveDataList, TInlineFrame, TInPlaceTextBox, TItemDataRenderer, TJavascriptLogger, TJsonRpcClient, TJsonService, TKeyboard, TLabel, TLinkButton, TListBox, TActiveDatePicker, TListControl, TListControlValidator, TLiteral, TLiteralColumn, TLogRouter, TMarkdown, TMemCache, TMultiView, TNumberFormat, TOutputCache, TActiveDropDownList, TPage, TPager, TPageService, TPanel, TParameterModule, TPlaceHolder, TRadioButton, TRadioButtonList, TRangeValidator, TRatingList, TActiveDropDownListColumn, TReadOnlyDataSource, TReCaptcha, TReCaptchaValidator, TRegularExpressionValidator, TRepeater, TRepeaterItem, TRepeaterItemRenderer, TRequiredFieldValidator, TRpcApiProvider, TRpcServer, TActiveEditCommandColumn, TRpcService, TSafeHtml, TScaffoldBase, TScaffoldEditView, TScaffoldListView, TScaffoldSearch, TScaffoldView, TSecurityManager, TSlider, TSoapService, TActiveFileUpload, TSqliteCache, TSqlMapConfig, TStatements, TStyleSheet, TTable, TTableCell, TTableFooterRow, TTableHeaderCell, TTableHeaderRow, TTableRow, TActiveHiddenField, TTabPanel, TTabView, TTemplateColumn, TTemplateControl, TTemplateControlInheritable, TTemplatedWizardStep, TTemplateManager, TTextBox, TTextHighlighter, TTextProcessor, TActiveBoundColumn, TActiveHyperLink, TThemeManager, TTimeTriggeredCallback, TTranslate, TTranslateParameter, TTriggeredCallback, TUrlManager, TUrlMapping, TUserManager, TValidationSummary, TValueTriggeredCallback, TActiveHyperLinkColumn, TView, TWebControl, TWebControlAdapter, TWizard, TWizardNavigationContainer, TWizardStep, TWsatGenerateAR, TWsatHome, TWsatLayout, TWsatLogin, TActiveImage, TWsatScaffolding, TWsatService, TXCache, TXmlRpcClient, TXmlTransform, TActiveImageButton, TActiveLabel, TActiveLinkButton, TActiveListBox, TActiveListControlAdapter, TActiveLiteralColumn, TActiveMultiView, TActiveButton, TActivePageAdapter, TActivePager, TActivePanel, TActiveRadioButton, TActiveRadioButtonList, TActiveRatingList, TActiveRecordConfig, TActiveRepeater, TActiveTableCell, TActiveTableRow, TActiveButtonColumn, TActiveTemplateColumn, TActiveTextBox, TAPCCache, TApplicationStatePersister, TAssetManager, TAuthManager, TAutoComplete, TBaseDataList, TBaseValidator, TBoundColumn, TActiveCheckBox, TBrowserLogRoute, TBulletedList, TButton, TButtonColumn, TCache, TCacheHttpSession, TCallback, TCallbackErrorHandler, TCallbackOptions, TCallbackResponseAdapter, TActiveCheckBoxColumn, TCaptcha, TCaptchaValidator, TCheckBox, TCheckBoxColumn, TCheckBoxList, TChoiceFormat, TClientScript, TColorPicker, TCompareValidator, TCompleteWizardStep, TActiveCheckBoxList, TCompositeControl, TConditional, TContent, TContentPlaceHolder, TCustomValidator, TDataBoundControl, TDataGrid, TDataGridItem, TDataGridItemRenderer, TDataGridPager, TActiveClientScript, TDataList, TDataListItem, TDataListItemRenderer, TDataRenderer, TDataSourceConfig, TDataSourceControl, TDataTypeValidator, TDateFormat, TDatePicker, TDbCache, TActiveControlAdapter, TDbLogRoute, TDbUserManager, TDraggable, TDropContainer, TDropDownList, TDropDownListColumn, TEACache, TEditCommandColumn, TEmailAddressValidator, TEmailLogRoute
Package: System
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at TApplicationComponent.php
Methods summary
public TApplication
# getApplication( )

Returns

TApplication
current application instance
public IService
# getService( )

Returns

IService
the current service
public THttpRequest
# getRequest( )

Returns

THttpRequest
the current user request
public THttpResponse
# getResponse( )

Returns

THttpResponse
the response
public THttpSession
# getSession( )

Returns

THttpSession
user session
public IUser
# getUser( )

Returns

IUser
information about the current user
public string
# publishAsset( string $assetPath, string $className = null )

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. Also note, it is recommended that you supply a class name as the second parameter to the method (e.g. publishAsset($assetPath,__CLASS__) ). By doing so, you avoid the issue that child classes may not work properly because the asset path will be relative to the directory containing the child class file.

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. Also note, it is recommended that you supply a class name as the second parameter to the method (e.g. publishAsset($assetPath,__CLASS__) ). By doing so, you avoid the issue that child classes may not work properly because the asset path will be relative to the directory containing the child class file.

Parameters

$assetPath
string
path of the asset that is relative to the directory containing the specified class file.
$className
string
name of the class whose containing directory will be prepend to the asset path. If null, it means get_class($this).

Returns

string
URL to the asset path.
public string
# publishFilePath( string $fullPath, mixed $checkTimestamp = false )

Publishes a file or directory and returns its URL.

Publishes a file or directory and returns its URL.

Parameters

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

Returns

string
URL to the published file or directory
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO