Packages

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

Classes

  • FormControl

Functions

  • callback
  • dump
  • Overview
  • Package
  • Function
  • Tree
 1: <?php
 2: 
 3: /**
 4:  * Nette Framework (version 2.0-dev released on 2011-07-02, http://nette.org)
 5:  *
 6:  * Copyright (c) 2004, 2011 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: @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: /**
36:  * Load and configure Nette Framework.
37:  */
38: 
39: /** @internal */
40: class NCFix
41: {
42:     static $vars = array();
43: 
44:     static function uses($args)
45:     {
46:         self::$vars[] = $args;
47:         return count(self::$vars)-1;
48:     }
49: }
50: 
51: define('NETTE', TRUE);
52: define('NETTE_DIR', dirname(__FILE__));
53: define('NETTE_VERSION_ID', 20000); // v2.0.0
54: define('NETTE_PACKAGE', 'PHP 5.2');
55: 
56: 
57: 
58: require_once dirname(__FILE__) . '/common/exceptions.php';
59: require_once dirname(__FILE__) . '/common/Object.php';
60: require_once dirname(__FILE__) . '/Utils/LimitedScope.php';
61: require_once dirname(__FILE__) . '/Loaders/AutoLoader.php';
62: require_once dirname(__FILE__) . '/Loaders/NetteLoader.php';
63: 
64: 
65: NetteLoader::getInstance()->register();
66: 
67: require_once dirname(__FILE__) . '/Diagnostics/Helpers.php';
68: require_once dirname(__FILE__) . '/Utils/Html.php';
69: Debugger::_init();
70: 
71: SafeStream::register();
72: 
73: 
74: 
75: /**
76:  * Callback factory.
77:  * @param  mixed   class, object, function, callback
78:  * @param  string  method
79:  * @return Callback
80:  */
81: function callback($callback, $m = NULL)
82: {
83:     return ($m === NULL && $callback instanceof Callback) ? $callback : new Callback($callback, $m);
84: }
85: 
86: 
87: 
88: /**
89:  * Debugger::dump shortcut.
90:  */
91: function dump($var)
92: {
93:     foreach (func_get_args() as $arg) Debugger::dump($arg);
94:     return $var;
95: }
96: 
Nette Framework 2.0beta1 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0