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_parsetree_code.php 889B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Smarty Internal Plugin Templateparser Parse Tree
  4. * These are classes to build parse trees in the template parser
  5. *
  6. * @package Smarty
  7. * @subpackage Compiler
  8. * @author Thue Kristensen
  9. * @author Uwe Tews
  10. */
  11. /**
  12. * Code fragment inside a tag .
  13. *
  14. * @package Smarty
  15. * @subpackage Compiler
  16. * @ignore
  17. */
  18. class Smarty_Internal_ParseTree_Code extends Smarty_Internal_ParseTree
  19. {
  20. /**
  21. * Create parse tree buffer for code fragment
  22. *
  23. * @param string $data content
  24. */
  25. public function __construct($data)
  26. {
  27. $this->data = $data;
  28. }
  29. /**
  30. * Return buffer content in parentheses
  31. *
  32. * @param \Smarty_Internal_Templateparser $parser
  33. *
  34. * @return string content
  35. */
  36. public function to_smarty_php(Smarty_Internal_Templateparser $parser)
  37. {
  38. return sprintf("(%s)", $this->data);
  39. }
  40. }