1: <?php
2:
3: require __DIR__ . '/SafeStream/SafeStream.php';
4:
5: Nette\Utils\SafeStream::register();
6:
7:
8: /**
9: * This file is part of the Tracy (https://tracy.nette.org)
10: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
11: */
12:
13: if (!function_exists('dump')) {
14: /**
15: * Tracy\Debugger::dump() shortcut.
16: * @tracySkipLocation
17: */
18: function dump($var)
19: {
20: array_map('Tracy\Debugger::dump', func_get_args());
21: return $var;
22: }
23: }
24:
25: if (!function_exists('dumpe')) {
26: /**
27: * Tracy\Debugger::dump() & exit shortcut.
28: * @tracySkipLocation
29: */
30: function dumpe($var)
31: {
32: array_map('Tracy\Debugger::dump', func_get_args());
33: exit;
34: }
35: }
36:
37: if (!function_exists('bdump')) {
38: /**
39: * Tracy\Debugger::barDump() shortcut.
40: * @tracySkipLocation
41: */
42: function bdump($var)
43: {
44: call_user_func_array('Tracy\Debugger::barDump', func_get_args());
45: return $var;
46: }
47: }
48:
49:
50: /**
51: * This file is part of the Nette Framework (https://nette.org)
52: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
53: */
54:
55: if (!function_exists('dlog')) {
56: /**
57: * Tracy\Debugger::log() shortcut.
58: * @deprecated
59: */
60: function dlog($var = null)
61: {
62: trigger_error(__FUNCTION__ . '() is deprecated.', E_USER_DEPRECATED);
63: if (func_num_args() === 0) {
64: Tracy\Debugger::log(new Exception, 'dlog');
65: }
66: foreach (func_get_args() as $arg) {
67: Tracy\Debugger::log($arg, 'dlog');
68: }
69: return $var;
70: }
71: }
72:
73:
74: if (!function_exists('callback')) {
75: /**
76: * Nette\Callback factory.
77: * @param mixed class, object, callable
78: * @param string method
79: * @return Nette\Callback
80: * @deprecated
81: */
82: function callback($callback, $m = null)
83: {
84: trigger_error(__FUNCTION__ . '() is deprecated; use native PHP callback.', E_USER_DEPRECATED);
85: return new Nette\Callback($callback, $m);
86: }
87: }
88: