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
-
TApplicationComponent
Direct known subclasses
TCallbackClientScript, TClientScriptManager, TLogRoute, TModule, TRpcClient, TService, TSoapServer, TTemplate, TTheme, TControl, TControlAdapter, TDataGridColumn, THtmlWriter, THttpRequest, THttpResponseAdapter, THttpSession, TJsonResponseIndirect 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, TEmailLogRouteCopyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at TApplicationComponent.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
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. |
public
string
|
#
publishFilePath( string $fullPath, mixed $checkTimestamp = false )
Publishes a file or directory and returns its URL. |
GLOBAL_RAISE_EVENT_LISTENER
|