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 | * 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 | * |
15 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
16 | */ |
17 | |
18 | namespace PhpOffice\PhpWord\Style; |
19 | |
20 | /** |
21 | * Table row style. |
22 | * |
23 | * @since 0.8.0 |
24 | */ |
25 | class Row extends AbstractStyle |
26 | { |
27 | /** |
28 | * Repeat table row on every new page. |
29 | * |
30 | * @var bool |
31 | */ |
32 | private $tblHeader = false; |
33 | |
34 | /** |
35 | * Table row cannot break across pages. |
36 | * |
37 | * @var bool |
38 | */ |
39 | private $cantSplit = false; |
40 | |
41 | /** |
42 | * Table row exact height. |
43 | * |
44 | * @var bool |
45 | */ |
46 | private $exactHeight = false; |
47 | |
48 | /** |
49 | * Create a new row style. |
50 | */ |
51 | public function __construct() |
52 | { |
53 | } |
54 | |
55 | /** |
56 | * Is tblHeader. |
57 | * |
58 | * @return bool |
59 | */ |
60 | public function isTblHeader() |
61 | { |
62 | return $this->tblHeader; |
63 | } |
64 | |
65 | /** |
66 | * Is tblHeader. |
67 | * |
68 | * @param bool $value |
69 | * |
70 | * @return self |
71 | */ |
72 | public function setTblHeader($value = true) |
73 | { |
74 | $this->tblHeader = $this->setBoolVal($value, $this->tblHeader); |
75 | |
76 | return $this; |
77 | } |
78 | |
79 | /** |
80 | * Is cantSplit. |
81 | * |
82 | * @return bool |
83 | */ |
84 | public function isCantSplit() |
85 | { |
86 | return $this->cantSplit; |
87 | } |
88 | |
89 | /** |
90 | * Is cantSplit. |
91 | * |
92 | * @param bool $value |
93 | * |
94 | * @return self |
95 | */ |
96 | public function setCantSplit($value = true) |
97 | { |
98 | $this->cantSplit = $this->setBoolVal($value, $this->cantSplit); |
99 | |
100 | return $this; |
101 | } |
102 | |
103 | /** |
104 | * Is exactHeight. |
105 | * |
106 | * @return bool |
107 | */ |
108 | public function isExactHeight() |
109 | { |
110 | return $this->exactHeight; |
111 | } |
112 | |
113 | /** |
114 | * Set exactHeight. |
115 | * |
116 | * @param bool $value |
117 | * |
118 | * @return self |
119 | */ |
120 | public function setExactHeight($value = true) |
121 | { |
122 | $this->exactHeight = $this->setBoolVal($value, $this->exactHeight); |
123 | |
124 | return $this; |
125 | } |
126 | } |