Files
smarty/libs/sysplugins/smarty_internal_compile_debug.php

42 lines
1.0 KiB
PHP
Raw Normal View History

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