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_block.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Smarty {block} tag class
  4. *
  5. * @package Smarty
  6. * @subpackage PluginsInternal
  7. * @author Uwe Tews
  8. */
  9. class Smarty_Internal_Block
  10. {
  11. /**
  12. * Block name
  13. *
  14. * @var string
  15. */
  16. public $name = '';
  17. /**
  18. * Hide attribute
  19. *
  20. * @var bool
  21. */
  22. public $hide = false;
  23. /**
  24. * Append attribute
  25. *
  26. * @var bool
  27. */
  28. public $append = false;
  29. /**
  30. * prepend attribute
  31. *
  32. * @var bool
  33. */
  34. public $prepend = false;
  35. /**
  36. * Block calls $smarty.block.child
  37. *
  38. * @var bool
  39. */
  40. public $callsChild = false;
  41. /**
  42. * Inheritance child block
  43. *
  44. * @var Smarty_Internal_Block|null
  45. */
  46. public $child = null;
  47. /**
  48. * Inheritance calling parent block
  49. *
  50. * @var Smarty_Internal_Block|null
  51. */
  52. public $parent = null;
  53. /**
  54. * Inheritance Template index
  55. *
  56. * @var int
  57. */
  58. public $tplIndex = 0;
  59. /**
  60. * Smarty_Internal_Block constructor.
  61. * - if outer level {block} of child template ($state === 1) save it as child root block
  62. * - otherwise process inheritance and render
  63. *
  64. * @param string $name block name
  65. * @param int|null $tplIndex index of outer level {block} if nested
  66. */
  67. public function __construct($name, $tplIndex)
  68. {
  69. $this->name = $name;
  70. $this->tplIndex = $tplIndex;
  71. }
  72. /**
  73. * Compiled block code overloaded by {block} class
  74. *
  75. * @param \Smarty_Internal_Template $tpl
  76. */
  77. public function callBlock(Smarty_Internal_Template $tpl)
  78. {
  79. }
  80. }