init
[garradin.git] / include / libs / template_lite / internal / template.generate_debug_output.php
1 <?php
2 /**
3 * Template Lite template_generate_debug_output template internal module
4 *
5 * Type: template
6 * Name: template_generate_debug_output
7 */
8
9 function template_generate_debug_output(&$object)
10 {
11 $assigned_vars = $object->_vars;
12 ksort($assigned_vars);
13 if (@is_array($object->_config[0]))
14 {
15 $config_vars = $object->_config[0];
16 ksort($config_vars);
17 $object->assign("_debug_config_keys", array_keys($config_vars));
18 $object->assign("_debug_config_vals", array_values($config_vars));
19 }
20
21 $included_templates = $object->_templatelite_debug_info;
22
23 $object->assign("_debug_keys", array_keys($assigned_vars));
24 $object->assign("_debug_vals", array_values($assigned_vars));
25 $object->assign("_debug_tpls", $included_templates);
26 $object->assign("_templatelite_debug_output", "");
27
28 $object->_templatelite_debug_loop = true;
29 $object->_templatelite_debug_dir = $object->template_dir;
30 $object->template_dir = TEMPLATE_LITE_DIR . "internal/";
31 $debug_output = $object->fetch("debug.tpl");
32 $object->template_dir = $object->_templatelite_debug_dir;
33 $object->_templatelite_debug_loop = false;
34 return $debug_output;
35 }
36
37 ?>