Initial repo created
[timetracker.git] / WEB-INF / lib / smarty / sysplugins / smarty_internal_compile_debug.php
1 <?php 
2 /**
3  * Smarty Internal Plugin Compile Debug
4  *
5  * Compiles the {debug} tag 
6  * It opens a window the the Smarty Debugging Console
7  * @package Smarty
8  * @subpackage Compiler
9  * @author Uwe Tews
10  */
11
12 /**
13  * Smarty Internal Plugin Compile Debug Class
14  */ 
15 class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
16     /**
17      * Compiles code for the {debug} tag
18      * 
19      * @param array $args array with attributes from parser
20      * @param object $compiler compiler object
21      * @return string compiled code
22      */
23     public function compile($args, $compiler)
24     {
25         $this->compiler = $compiler; 
26         // check and get attributes
27         $_attr = $this->_get_attributes($args);
28
29                 // compile always as nocache
30                 $this->compiler->tag_nocache = true;
31
32         // display debug template
33         $_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
34         return $_output;
35     } 
36
37
38 ?>