摘要:
运行config的时候,如果cwebapplication定义有public的属性,比如basePath,则不用调用魔术函数__setapplication=》run processrequest || runController|| || ||createController $controller->init(); $controller->run($actionID); || framework/web/CController的run =》runActionWithFilters组件是先注册,待需要用到时候在新建,初始化;比如loginForm.php中的login()Yii 阅读全文
摘要:
// index.phpYii::createWebApplication()->run();// CApplication.phppublic function run(){ if($this->hasEventHandler('onBeginRequest')) $this->onBeginRequest(new CEvent($this)); $this->processRequest(); if($this->hasEventHandler('onEndRequest')) $this->onEndRequest(ne 阅读全文