reports: Fix id of custom date selector
[ninja.git] / system / core / Bootstrap.php
blobabec51bcf9d73c36be7216172a4ba131d95002ad
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 3918 2009-01-21 03:15:53Z zombor $
7 * @package Core
8 * @author Kohana Team
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');
31 // Load core files
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
39 Kohana::setup();
41 if(!defined('SKIP_KOHANA')) {
43 // End kohana_loading
44 Benchmark::stop(SYSTEM_BENCHMARK.'_kohana_loading');
46 // Start system_initialization
47 Benchmark::start(SYSTEM_BENCHMARK.'_system_initialization');
49 // Prepare the system
50 Event::run('system.ready');
52 // Determine routing
53 Event::run('system.routing');
55 // End system_initialization
56 Benchmark::stop(SYSTEM_BENCHMARK.'_system_initialization');
58 // Make the magic happen!
59 try {
60 Event::run('system.execute');
61 } catch (Op5LivestatusException $ex) {
62 op5log::instance('ninja')->log('error', $ex);
63 Event::run('application.livestatus', $ex);
66 // Clean up and exit
67 Event::run('system.shutdown');