2011年6月22日

摘要: CComponent源码分析//所有部件的基类class CComponent{private $_e;private $_m;//获取部件属性、事件和行为的magic methodpublic function __get($name){ $getter='get'.$name; //是否存在属性的get方法 if(method_exists($this,$getter)) return $this->$getter(); //以on开头,获取事件处理句柄 else if(strncasecmp($name,'on',2)===0 && 阅读全文
posted @ 2011-06-22 18:07 天空尚兰 阅读(647) 评论(0) 推荐(0) 编辑
摘要: 通常的默认启动脚本: <code> Yii::createWebApplication(Ugc::loadConfig('base'))->run(); </code> 其执行以及CWebApplication::run()方法源码如下: CWebApplication::run(); <code> /** * Runs the application. * This method loads static application components. Derived classes usually overrides this * 阅读全文
posted @ 2011-06-22 17:49 天空尚兰 阅读(415) 评论(0) 推荐(0) 编辑

导航