PageRenderTime 46ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 31ms app.codeStats 0ms

/www/libs/nette-dev/loader.php

https://github.com/bazo/Mokuji
PHP | 72 lines | 26 code | 18 blank | 28 comment | 3 complexity | 6fdc5ea8c77235c1f0823b6b0551ccc2 MD5 | raw file
 1<?php
 2
 3/**
 4 * Nette Framework
 5 *
 6 * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
 7 *
 8 * This source file is subject to the "Nette license" that is bundled
 9 * with this package in the file license.txt, and/or GPL license.
10 *
11 * For more information please see http://nettephp.com
12 *
13 * @copyright  Copyright (c) 2004, 2010 David Grudl
14 * @license    http://nettephp.com/license  Nette license
15 * @link       http://nettephp.com
16 * @category   Nette
17 * @package    Nette
18 */
19
20
21
22/**
23 * Check PHP configuration.
24 */
25
26if (version_compare(PHP_VERSION, '5.2.0', '<')) {
27	throw new Exception('Nette Framework requires PHP 5.2.0 or newer.');
28}
29
30
31@set_magic_quotes_runtime(FALSE); // intentionally @
32
33
34
35/**
36 * Nette\Callback factory.
37 * @param  mixed   class, object, function, callback
38 * @param  string  method
39 * @return Callback
40 */
41function callback($callback, $m = NULL)
42{
43	return ($m === NULL && $callback instanceof Callback) ? $callback : new Callback($callback, $m);
44}
45
46
47
48/**
49 * Nette\Debug::dump shortcut.
50 */
51if (!function_exists('dump')) {
52	function dump($var)
53	{
54		foreach (func_get_args() as $arg) Debug::dump($arg);
55		return $var;
56	}
57}
58
59
60
61require_once dirname(__FILE__) . '/exceptions.php';
62require_once dirname(__FILE__) . '/Framework.php';
63require_once dirname(__FILE__) . '/Object.php';
64require_once dirname(__FILE__) . '/ObjectMixin.php';
65require_once dirname(__FILE__) . '/Callback.php';
66require_once dirname(__FILE__) . '/Loaders/LimitedScope.php';
67require_once dirname(__FILE__) . '/Loaders/AutoLoader.php';
68require_once dirname(__FILE__) . '/Loaders/NetteLoader.php';
69
70
71NetteLoader::getInstance()->base = dirname(__FILE__);
72NetteLoader::getInstance()->register();