Route and Results buttons updated.
[speedfreak] / Server / system / core / Bootstrap.php
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3  * Kohana process control file, loaded by the front controller.
4  * 
5  * $Id: Bootstrap.php 4409 2009-06-06 00:48:26Z zombor $
6  *
7  * @package    Core
8  * @author     Kohana Team
9  * @copyright  (c) 2007 Kohana Team
10  * @license    http://kohanaphp.com/license.html
11  */
12
13 define('KOHANA_VERSION',  '2.3.4');
14 define('KOHANA_CODENAME', 'buteo regalis');
15
16 // Test of Kohana is running in Windows
17 define('KOHANA_IS_WIN', DIRECTORY_SEPARATOR === '\\');
18
19 // Kohana benchmarks are prefixed to prevent collisions
20 define('SYSTEM_BENCHMARK', 'system_benchmark');
21
22 // Load benchmarking support
23 require SYSPATH.'core/Benchmark'.EXT;
24
25 // Start total_execution
26 Benchmark::start(SYSTEM_BENCHMARK.'_total_execution');
27
28 // Start kohana_loading
29 Benchmark::start(SYSTEM_BENCHMARK.'_kohana_loading');
30
31 // Load core files
32 require SYSPATH.'core/utf8'.EXT;
33 require SYSPATH.'core/Event'.EXT;
34 require SYSPATH.'core/Kohana'.EXT;
35
36 // Prepare the environment
37 Kohana::setup();
38
39 // End kohana_loading
40 Benchmark::stop(SYSTEM_BENCHMARK.'_kohana_loading');
41
42 // Start system_initialization
43 Benchmark::start(SYSTEM_BENCHMARK.'_system_initialization');
44
45 // Prepare the system
46 Event::run('system.ready');
47
48 // Determine routing
49 Event::run('system.routing');
50
51 // End system_initialization
52 Benchmark::stop(SYSTEM_BENCHMARK.'_system_initialization');
53
54 // Make the magic happen!
55 Event::run('system.execute');
56
57 // Clean up and exit
58 Event::run('system.shutdown');