Entry script (index.php or yii) Folder 4 Load application config Create application instance Folder 5 preInit() Register error handler Configure application properties init() bootstrap() Run application Folder 3 EVENT_BEFORE_REQUEST Handle request Folder 4 Resolve request into route and parameters Create module, controller and action Run action EVENT_AFTER_REQUEST Send response to end user Complete request processing Configuration array Exit status