1: <?php
2:
3: 4: 5: 6: 7:
8:
9:
10: 11: 12:
13: if (!defined('PHP_VERSION_ID')) {
14: $tmp = explode('.', PHP_VERSION);
15: define('PHP_VERSION_ID', ($tmp[0] * 10000 + $tmp[1] * 100 + $tmp[2]));
16: }
17:
18: if (PHP_VERSION_ID < 50200) {
19: throw new Exception('Nette Framework requires PHP 5.2.0 or newer.');
20: }
21:
22: error_reporting(E_ALL | E_STRICT);
23: @set_magic_quotes_runtime(FALSE);
24: @iconv_set_encoding('internal_encoding', 'UTF-8');
25: extension_loaded('mbstring') && mb_internal_encoding('UTF-8');
26: umask(0);
27: @header('X-Powered-By: Nette Framework');
28: @header('Content-Type: text/html; charset=utf-8');
29:
30:
31: 32: 33:
34:
35: empty($GLOBALS[0]) && $GLOBALS[0] = array();
36: define('NETTE', TRUE);
37: define('NETTE_DIR', dirname(__FILE__));
38: define('NETTE_VERSION_ID', 20018);
39: define('NETTE_PACKAGE', 'PHP 5.2');
40:
41:
42: require_once dirname(__FILE__) . '/common/exceptions.php';
43: require_once dirname(__FILE__) . '/common/Object.php';
44: require_once dirname(__FILE__) . '/Utils/LimitedScope.php';
45: require_once dirname(__FILE__) . '/Loaders/AutoLoader.php';
46: require_once dirname(__FILE__) . '/Loaders/NetteLoader.php';
47:
48:
49: NetteLoader::getInstance()->register();
50:
51: require_once dirname(__FILE__) . '/Diagnostics/Helpers.php';
52: require_once dirname(__FILE__) . '/Diagnostics/shortcuts.php';
53: require_once dirname(__FILE__) . '/Utils/Html.php';
54: Debugger::_init();
55:
56: SafeStream::register();
57:
58: 59: 60: 61: 62: 63:
64: function callback($callback, $m = NULL)
65: {
66: return new Callback($callback, $m);
67: }
68: