ApplicationComponent.php 607 Bytes
Newer Older
w  
Qiang Xue committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?php
/**
 * ApplicationComponent class file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2012 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace yii\base;

/**
 * ApplicationComponent is the base class for application component classes.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
Qiang Xue committed
18
class ApplicationComponent extends Component
w  
Qiang Xue committed
19 20
{
	/**
Qiang Xue committed
21
	 * @var string unique ID of this application component
w  
Qiang Xue committed
22
	 */
Qiang Xue committed
23 24
	public $id;

w  
Qiang Xue committed
25 26
	public function init()
	{
Qiang Xue committed
27 28 29 30
		parent::init();
		if ($this->id === null) {
			$this->id = get_class($this);
		}
w  
Qiang Xue committed
31 32
	}
}