* @link http://www.yiiframework.com/ * @copyright Copyright © 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ /** * CApplicationComponent is the base class for application component classes. * * CApplicationComponent implements the basic methods required by {@link IApplicationComponent}. * * When developing an application component, try to put application component initialization code in * the {@link init()} method instead of the constructor. This has the advantage that * the application component can be customized through application configuration. * * @author Qiang Xue * @version $Id$ * @package system.base * @since 1.0 */ abstract class CApplicationComponent extends CComponent implements IApplicationComponent { private $_initialized=false; /** * Initializes the application component. * This method is required by {@link IApplicationComponent} and is invoked by application. * If you override this method, make sure to call the parent implementation * so that the application component can be marked as initialized. */ public function init() { $this->_initialized=true; } /** * @return boolean whether this application component has been initialized (i.e., {@link init()} is invoked.) */ public function getIsInitialized() { return $this->_initialized; } }