Row.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. /**
  3. * This file is part of PHPWord - A pure PHP library for reading and writing
  4. * word processing documents.
  5. *
  6. * PHPWord is free software distributed under the terms of the GNU Lesser
  7. * General Public License version 3 as published by the Free Software Foundation.
  8. *
  9. * For the full copyright and license information, please read the LICENSE
  10. * file that was distributed with this source code. For the full list of
  11. * contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
  12. *
  13. * @see https://github.com/PHPOffice/PHPWord
  14. * @copyright 2010-2018 PHPWord contributors
  15. * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
  16. */
  17. namespace PhpOffice\PhpWord\Style;
  18. /**
  19. * Table row style
  20. *
  21. * @since 0.8.0
  22. */
  23. class Row extends AbstractStyle
  24. {
  25. /**
  26. * Repeat table row on every new page
  27. *
  28. * @var bool
  29. */
  30. private $tblHeader = false;
  31. /**
  32. * Table row cannot break across pages
  33. *
  34. * @var bool
  35. */
  36. private $cantSplit = false;
  37. /**
  38. * Table row exact height
  39. *
  40. * @var bool
  41. */
  42. private $exactHeight = false;
  43. /**
  44. * Create a new row style
  45. */
  46. public function __construct()
  47. {
  48. }
  49. /**
  50. * Is tblHeader
  51. *
  52. * @return bool
  53. */
  54. public function isTblHeader()
  55. {
  56. return $this->tblHeader;
  57. }
  58. /**
  59. * Is tblHeader
  60. *
  61. * @param bool $value
  62. * @return self
  63. */
  64. public function setTblHeader($value = true)
  65. {
  66. $this->tblHeader = $this->setBoolVal($value, $this->tblHeader);
  67. return $this;
  68. }
  69. /**
  70. * Is cantSplit
  71. *
  72. * @return bool
  73. */
  74. public function isCantSplit()
  75. {
  76. return $this->cantSplit;
  77. }
  78. /**
  79. * Is cantSplit
  80. *
  81. * @param bool $value
  82. * @return self
  83. */
  84. public function setCantSplit($value = true)
  85. {
  86. $this->cantSplit = $this->setBoolVal($value, $this->cantSplit);
  87. return $this;
  88. }
  89. /**
  90. * Is exactHeight
  91. *
  92. * @return bool
  93. */
  94. public function isExactHeight()
  95. {
  96. return $this->exactHeight;
  97. }
  98. /**
  99. * Set exactHeight
  100. *
  101. * @param bool $value
  102. * @return self
  103. */
  104. public function setExactHeight($value = true)
  105. {
  106. $this->exactHeight = $this->setBoolVal($value, $this->exactHeight);
  107. return $this;
  108. }
  109. /**
  110. * Get tblHeader
  111. *
  112. * @deprecated 0.10.0
  113. *
  114. * @codeCoverageIgnore
  115. */
  116. public function getTblHeader()
  117. {
  118. return $this->isTblHeader();
  119. }
  120. /**
  121. * Get cantSplit
  122. *
  123. * @deprecated 0.10.0
  124. *
  125. * @codeCoverageIgnore
  126. */
  127. public function getCantSplit()
  128. {
  129. return $this->isCantSplit();
  130. }
  131. /**
  132. * Get exactHeight
  133. *
  134. * @deprecated 0.10.0
  135. *
  136. * @codeCoverageIgnore
  137. */
  138. public function getExactHeight()
  139. {
  140. return $this->isExactHeight();
  141. }
  142. }