ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Debug.php File Reference

Go to the source code of this file.

Data Structures

class  Twig_Extension_Debug
 

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.

References $i, $key, array, and Twig_Environment\isDebug().

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 }
isDebug()
Checks if debug mode is enabled.
Create styles array
The data for the language used.
Default base class for compiled templates.
Definition: Template.php:24
$i
Definition: disco.tpl.php:19
$key
Definition: croninfo.php:18
+ Here is the call graph for this function: