加载控制器及其方法:

根据route信息,获得当前控制器
      |
初始化当前控制器,CController::init(),默认为空
      |
执行当前控制器,CController::run()
      |
      |----> 创建action,为空则默认为index
                     |
             得到CInlineAction的实例
                     |
             用父对象执行beforeControllerAction:默认是CWebApplication,直接返回TRUE
                     |
                执行action
                     |----> 备份原来的action
                                 |
                            执行beforeAction()
                                 |
                            runWithParams()----> 实际上是执行CInlineAction->runWithParams()
                                                             |
                                                 在实例中,执行SiteController->actionIndex()
                                                             |
                                                 渲染页面:render('index')
                                                             |
                                 |<--------------------------|
                                 |
                            执行afterAction()
                                 |
                            恢复原来action
                                 |
                     |<----------|
                     |
             用父对象执行afterControllerAction:默认是CWebApplication,为空
       |<------------|
     完成

相关文章:

  • 2021-07-07
  • 2021-07-01
  • 2022-01-19
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-29
  • 2021-09-14
  • 2022-12-23
  • 2021-08-21
  • 2021-05-29
  • 2022-02-28
  • 2021-08-17
相关资源
相似解决方案