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