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 {@link getApplication Application} property gives the application instance that this component belongs to; {@link getService Service} gives the current running service; {@link getRequest Request}, {@link getResponse Response} and {@link getSession Session} return the request and response modules, respectively; And {@link getUser User} gives the current user instance. Besides, TApplicationComponent defines two shortcut methods for publishing private files: {@link publishAsset} and {@link publishFilePath}.
С версии: 3.0
Автор: Qiang Xue (qiang.xue@gmail.com)
Наследование: extends TComponent
Пример #1
0
 /**
  * Checks for the existance of a property value by name or a control by ID.
  * This overrides the parent implementation by allowing checking for the
  * existance of a control via its ID using the following syntax,
  * <code>
  * $menuBarExists = isset($this->menuBar);
  * </code>
  * Do not call this method. This is a PHP magic method that we override
  * to allow using isset() to detect if a component property is set or not.
  * Note, the control must be configured in the template
  * with explicit ID. If the name matches both a property and a control ID,
  * the control ID will take the precedence.
  *
  * @param string the property name or control ID
  * @return bool wether the control or property exists
  * @see __get
  */
 public function __isset($name)
 {
     if (isset($this->_rf[self::RF_NAMED_OBJECTS][$name])) {
         return true;
     } else {
         return parent::__isset($name);
     }
 }