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
 1: <?php
 2: 
 3: /**
 4:  * Nette Framework (version 2.0.1 released on 2012-02-29, http://nette.org)
 5:  *
 6:  * Copyright (c) 2004, 2012 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: /**
15:  * Check and reset PHP configuration.
16:  */
17: if (!defined('PHP_VERSION_ID')) {
18:     $tmp = explode('.', PHP_VERSION);
19:     define('PHP_VERSION_ID', ($tmp[0] * 10000 + $tmp[1] * 100 + $tmp[2]));
20: }
21: 
22: if (PHP_VERSION_ID < 50200) {
23:     throw new Exception('Nette Framework requires PHP 5.2.0 or newer.');
24: }
25: 
26: error_reporting(E_ALL | E_STRICT);
27: @set_magic_quotes_runtime(FALSE); // @ - deprecated since PHP 5.3.0
28: iconv_set_encoding('internal_encoding', 'UTF-8');
29: extension_loaded('mbstring') && mb_internal_encoding('UTF-8');
30: umask(0);
31: @header('X-Powered-By: Nette Framework'); // @ - headers may be sent
32: @header('Content-Type: text/html; charset=utf-8'); // @ - headers may be sent
33: 
34: 
35: 
36: /**
37:  * Load and configure Nette Framework.
38:  */
39: 
40: /** @internal */
41: class NCFix
42: {
43:     static $vars = array();
44: 
45:     static function uses($args)
46:     {
47:         self::$vars[] = $args;
48:         return count(self::$vars)-1;
49:     }
50: }
51: 
52: define('NETTE', TRUE);
53: define('NETTE_DIR', dirname(__FILE__));
54: define('NETTE_VERSION_ID', 20001); // v2.0.1
55: define('NETTE_PACKAGE', 'PHP 5.2 prefixed');
56: 
57: 
58: 
59: require_once dirname(__FILE__) . '/common/exceptions.php';
60: require_once dirname(__FILE__) . '/common/Object.php';
61: require_once dirname(__FILE__) . '/Utils/LimitedScope.php';
62: require_once dirname(__FILE__) . '/Loaders/AutoLoader.php';
63: require_once dirname(__FILE__) . '/Loaders/NetteLoader.php';
64: 
65: 
66: NNetteLoader::getInstance()->register();
67: 
68: require_once dirname(__FILE__) . '/Diagnostics/Helpers.php';
69: require_once dirname(__FILE__) . '/Diagnostics/shortcuts.php';
70: require_once dirname(__FILE__) . '/Utils/Html.php';
71: NDebugger::_init();
72: 
73: NSafeStream::register();
74: 
75: 
76: 
77: /**
78:  * NCallback factory.
79:  * @param  mixed   class, object, function, callback
80:  * @param  string  method
81:  * @return NCallback
82:  */
83: function callback($callback, $m = NULL)
84: {
85:     return ($m === NULL && $callback instanceof NCallback) ? $callback : new NCallback($callback, $m);
86: }
87: 
Nette Framework 2.0.1 (for PHP 5.2, prefixed) API API documentation generated by ApiGen 2.7.0