0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CakePHP2のController, Componentのコールバック実行順序

Posted at

CakePHP2のController, Componentのコールバック実行順序を以前どこかでみかけたと思ったんですが、発見できなかったので改めて調べました。

  1. Component:initialize
  2. Controller:beforeFilter
  3. Component:startup
  4. Controller::アクション
  5. Controller:render
  6. Component:beforeRender
  7. Controller:beforeRender
  8. Component:shutdown
  9. Controller::afterFilter

参考
CakePHP アプリケーション実行の流れをシーケンス図で書いてみた - Shin x blog
(時期的にcakephp1.x系かな?見比べてみるとbeforeRenderの順序が調べたのとは逆でController->Componentだなぁ)

CakePHPのControllerとComponentの実行順序 - Qiita
(タグはcakephp3となってた)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?