Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Functions

  • callback
  • dump
  • Overview
  • Package
  • Function
  • Tree
  • Deprecated
 1: <?php
 2: 
 3: /**
 4:  * Nette Framework (version 2.0.13 released on 2013-11-05, http://nette.org)
 5:  *
 6:  * Copyright (c) 2004, 2013 David Grudl (http://davidgrudl.com)
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the file license.txt that was distributed with this source code.
10:  */
11: 
12: 
13: /**
14:  * Check and reset PHP configuration.
15:  */
16: if (!defined('PHP_VERSION_ID')) {
17:     $tmp = explode('.', PHP_VERSION);
18:     define('PHP_VERSION_ID', ($tmp[0] * 10000 + $tmp[1] * 100 + $tmp[2]));
19: }
20: 
21: if (PHP_VERSION_ID < 50200) {
22:     throw new Exception('Nette Framework requires PHP 5.2.0 or newer.');
23: }
24: 
25: error_reporting(E_ALL | E_STRICT);
26: @set_magic_quotes_runtime(FALSE); // @ - deprecated since PHP 5.3.0
27: iconv_set_encoding('internal_encoding', 'UTF-8');
28: extension_loaded('mbstring') && mb_internal_encoding('UTF-8');
29: umask(0);
30: @header('X-Powered-By: Nette Framework'); // @ - headers may be sent
31: @header('Content-Type: text/html; charset=utf-8'); // @ - headers may be sent
32: 
33: 
34: /**
35:  * Load and configure Nette Framework.
36:  */
37: 
38: empty($GLOBALS[0]) && $GLOBALS[0] = array();
39: define('NETTE', TRUE);
40: define('NETTE_DIR', dirname(__FILE__));
41: define('NETTE_VERSION_ID', 20013); // v2.0.13
42: define('NETTE_PACKAGE', 'PHP 5.2');
43: 
44: 
45: require_once dirname(__FILE__) . '/common/exceptions.php';
46: require_once dirname(__FILE__) . '/common/Object.php';
47: require_once dirname(__FILE__) . '/Utils/LimitedScope.php';
48: require_once dirname(__FILE__) . '/Loaders/AutoLoader.php';
49: require_once dirname(__FILE__) . '/Loaders/NetteLoader.php';
50: 
51: 
52: NetteLoader::getInstance()->register();
53: 
54: require_once dirname(__FILE__) . '/Diagnostics/Helpers.php';
55: require_once dirname(__FILE__) . '/Diagnostics/shortcuts.php';
56: require_once dirname(__FILE__) . '/Utils/Html.php';
57: Debugger::_init();
58: 
59: SafeStream::register();
60: 
61: /**
62:  * Callback factory.
63:  * @param  mixed   class, object, callable
64:  * @param  string  method
65:  * @return Callback
66:  */
67: function callback($callback, $m = NULL)
68: {
69:     return new Callback($callback, $m);
70: }
71: 
Nette Framework 2.0.13 (for PHP 5.2, un-prefixed) API API documentation generated by ApiGen 2.8.0