PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty3/lib/libs/sysplugins/smarty_internal_compile_debug.php

http://zoop.googlecode.com/
PHP | 34 lines | 11 code | 2 blank | 21 comment | 0 complexity | d981e6eed854ccddd3ddb2df47860686 MD5 | raw file
 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* Smarty Internal Plugin Compile Debug Class
13*/ 
14class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
15    /**
16    * Compiles code for the {debug} tag
17    * 
18    * @param array $args array with attributes from parser
19    * @param object $compiler compiler object
20    * @return string compiled code
21    */
22    public function compile($args, $compiler)
23    {
24        $this->compiler = $compiler; 
25        // check and get attributes
26        $_attr = $this->_get_attributes($args);
27
28        // display debug template
29        $_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty); ?>";
30        return $_output;
31    } 
32} 
33
34?>