You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty_internal_compile_ldelim.php 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Smarty Internal Plugin Compile Ldelim
  4. * Compiles the {ldelim} tag
  5. *
  6. * @package Smarty
  7. * @subpackage Compiler
  8. * @author Uwe Tews
  9. */
  10. /**
  11. * Smarty Internal Plugin Compile Ldelim Class
  12. *
  13. * @package Smarty
  14. * @subpackage Compiler
  15. */
  16. class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase
  17. {
  18. /**
  19. * Compiles code for the {ldelim} tag
  20. * This tag does output the left delimiter
  21. *
  22. * @param array $args array with attributes from parser
  23. * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
  24. *
  25. * @return string compiled code
  26. * @throws \SmartyCompilerException
  27. */
  28. public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
  29. {
  30. $_attr = $this->getAttributes($compiler, $args);
  31. if ($_attr['nocache'] === true) {
  32. $compiler->trigger_template_error('nocache option not allowed', null, true);
  33. }
  34. // this tag does not return compiled code
  35. $compiler->has_code = true;
  36. return $compiler->smarty->left_delimiter;
  37. }
  38. }