Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NFormControl

Exceptions

  • ArgumentOutOfRangeException
  • DeprecatedException
  • DirectoryNotFoundException
  • FatalErrorException
  • FileNotFoundException
  • InvalidStateException
  • IOException
  • MemberAccessException
  • NotImplementedException
  • NotSupportedException

Functions

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