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:
26: /**
27: * This file is part of the Nette Framework (https://nette.org)
28: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
29: */
30:
31: if (!function_exists('dlog')) {
32: /**
33: * Tracy\Debugger::log() shortcut.
34: */
35: function dlog($var = NULL)
36: {
37: if (func_num_args() === 0) {
38: Tracy\Debugger::log(new Exception, 'dlog');
39: }
40: foreach (func_get_args() as $arg) {
41: Tracy\Debugger::log($arg, 'dlog');
42: }
43: return $var;
44: }
45: }
46:
47:
48: if (!function_exists('callback')) {
49: /**
50: * Nette\Callback factory.
51: * @param mixed class, object, callable
52: * @param string method
53: * @return Nette\Callback
54: */
55: function callback($callback, $m = NULL)
56: {
57: return new Nette\Callback($callback, $m);
58: }
59: }
60: