1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Kohana process control file, loaded by the front controller.
5 * $Id: Bootstrap.php 3918 2009-01-21 03:15:53Z zombor $
9 * @copyright (c) 2007 Kohana Team
10 * @license http://kohanaphp.com/license.html
13 define('KOHANA_VERSION', '2.3.1');
14 define('KOHANA_CODENAME', 'accipiter');
16 // Test of Kohana is running in Windows
17 define('KOHANA_IS_WIN', DIRECTORY_SEPARATOR
=== '\\');
19 // Kohana benchmarks are prefixed to prevent collisions
20 define('SYSTEM_BENCHMARK', 'system_benchmark');
22 // Load benchmarking support
23 require SYSPATH
.'core/Benchmark'.EXT
;
25 // Start total_execution
26 Benchmark
::start(SYSTEM_BENCHMARK
.'_total_execution');
28 // Start kohana_loading
29 Benchmark
::start(SYSTEM_BENCHMARK
.'_kohana_loading');
32 require SYSPATH
.'core/utf8'.EXT
;
33 require SYSPATH
.'core/Event'.EXT
;
34 require SYSPATH
.'core/Kohana'.EXT
;
36 require_once 'op5/log.php';
38 // Prepare the environment
41 if(!defined('SKIP_KOHANA')) {
44 Benchmark
::stop(SYSTEM_BENCHMARK
.'_kohana_loading');
46 // Start system_initialization
47 Benchmark
::start(SYSTEM_BENCHMARK
.'_system_initialization');
50 Event
::run('system.ready');
53 Event
::run('system.routing');
55 // End system_initialization
56 Benchmark
::stop(SYSTEM_BENCHMARK
.'_system_initialization');
58 // Make the magic happen!
60 Event
::run('system.execute');
61 } catch (Op5LivestatusException
$ex) {
62 op5log
::instance('ninja')->log('error', $ex);
63 Event
::run('application.livestatus', $ex);
67 Event
::run('system.shutdown');