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