Class \Prado\TApplicationComponent
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 \Prado\getApplication property gives the application instance that this component belongs to; \Prado\getService gives the current running service; \Prado\getRequest, \Prado\getResponse and \Prado\getSession return the request and response modules, respectively; And \Prado\getUser gives the current user instance.
Besides, TApplicationComponent defines two shortcut methods for publishing private files: publishAsset and publishFilePath.
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
publishAsset(string $assetPath[, string $className = null ]) : string
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
|
publishFilePath(string $fullPath[, mixed $checkTimestamp = false ]) : string
Publishes a file or directory and returns its URL.
|
protected
|
getClassFxEvents(object $class) : array<string|int, string>
This caches the 'fx' events for PRADO classes in the application cache
|
public
mixed
|
FX_CACHE_FILE
|
'fxevent.cache'
|
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |