Sie sind auf Seite 1von 1

The events sequence in the Kohana application

Bootstrap.php
Start output buffering,
Adding some constants Set autoloader and error
handlers, adding some
Loading core classes: utf8, Event & Kohana system event callback,
hooks loading
Kohana::setup()
Kohana_Loading

Environment_Setup

Buffering on
Callback adding for routing, execute, 404 and
shutdown events
Include hooks First available system event,
free of system callbacks

system.ready Preparing URI to find


controller, defining routing
segments
System_Initialization

system.routing

Router::find_uri() URI has been analyzed, it’s


a last chance to manually
change the routing
Router::setup()
system.post_routing Creating the instance of
controller and executing its
method

system.execute
Name of the controller is
already known but has not
Kohana::instance()
Controller_Setup

yet been created


Total_Execution

system.pre_controller

Creating of Router-calculated controller The controller set up, but his


instance method was not executed

system.post_controller_constructor
Controller completes the
Controller_Execution

work
Execute the controller method

system.post_controller
Before the framework
shutdown

The event before sending


system.shutdown headers (cookies and the
session still available for writing)
Kohana::shutdown()
Clear output buffer
Event before printing the
system.send_headers generated output

Session::write_close()
Additional events
system.display
system.404
*Profiler::render() Page not found
*Expires::prevent_output() system.redirect
Before headers sending by
Kohana::render() url::redirect()
system.log
Formed the log message in
Kohana::log()

Das könnte Ihnen auch gefallen