ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Debug.php File Reference

Go to the source code of this file.

Data Structures

class  Twig_Extension_Debug
 @final More...
 

Functions

 twig_var_dump (Twig_Environment $env, $context)
 

Function Documentation

◆ twig_var_dump()

twig_var_dump ( Twig_Environment  $env,
  $context 
)

Definition at line 40 of file Debug.php.

41{
42 if (!$env->isDebug()) {
43 return;
44 }
45
46 ob_start();
47
48 $count = func_num_args();
49 if (2 === $count) {
50 $vars = array();
51 foreach ($context as $key => $value) {
52 if (!$value instanceof Twig_Template) {
53 $vars[$key] = $value;
54 }
55 }
56
57 var_dump($vars);
58 } else {
59 for ($i = 2; $i < $count; ++$i) {
60 var_dump(func_get_arg($i));
61 }
62 }
63
64 return ob_get_clean();
65}
$env
Default base class for compiled templates.
Definition: Template.php:25
$key
Definition: croninfo.php:18
$i
Definition: disco.tpl.php:19
$context
Definition: webdav.php:25

References $context, $env, $i, and $key.