2009-11-06 14:35:00 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2010-08-17 15:39:51 +00:00
|
|
|
* Smarty Internal Plugin Compile Debug
|
|
|
|
*
|
|
|
|
* Compiles the {debug} tag
|
|
|
|
* It opens a window the the Smarty Debugging Console
|
|
|
|
* @package Smarty
|
|
|
|
* @subpackage Compiler
|
|
|
|
* @author Uwe Tews
|
|
|
|
*/
|
|
|
|
|
2009-11-06 14:35:00 +00:00
|
|
|
/**
|
2010-08-17 15:39:51 +00:00
|
|
|
* Smarty Internal Plugin Compile Debug Class
|
|
|
|
*/
|
2009-11-06 14:35:00 +00:00
|
|
|
class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
|
|
|
|
/**
|
2010-08-17 15:39:51 +00:00
|
|
|
* Compiles code for the {debug} tag
|
|
|
|
*
|
|
|
|
* @param array $args array with attributes from parser
|
|
|
|
* @param object $compiler compiler object
|
|
|
|
* @return string compiled code
|
|
|
|
*/
|
2009-11-06 14:35:00 +00:00
|
|
|
public function compile($args, $compiler)
|
|
|
|
{
|
|
|
|
$this->compiler = $compiler;
|
|
|
|
// check and get attributes
|
|
|
|
$_attr = $this->_get_attributes($args);
|
|
|
|
|
2010-11-11 21:34:36 +00:00
|
|
|
// compile always as nocache
|
|
|
|
$this->compiler->tag_nocache = true;
|
|
|
|
|
2009-11-06 14:35:00 +00:00
|
|
|
// display debug template
|
2010-11-13 04:10:52 +00:00
|
|
|
$_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
|
2009-11-06 14:35:00 +00:00
|
|
|
return $_output;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-17 15:39:51 +00:00
|
|
|
?>
|