PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / libraries / vendor / PhpSpreadsheet / Worksheet / Dimension.php

Dimension.php in TablePress – Tables in WordPress made easy 3.4, at libraries/vendor/PhpSpreadsheet/Worksheet/Dimension.php

125 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TablePress\PhpOffice\PhpSpreadsheet\Worksheet;
4
5 use TablePress\PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
6
7 abstract class Dimension
8 {
9 /**
10 * Visible?
11 */
12 private bool $visible = true;
13
14 /**
15 * Outline level.
16 */
17 private int $outlineLevel = 0;
18
19 /**
20 * Collapsed.
21 */
22 private bool $collapsed = false;
23
24 /**
25 * Index to cellXf. Null value means row has no explicit cellXf format.
26 */
27 private ?int $xfIndex;
28
29 /**
30 * Create a new Dimension.
31 *
32 * @param ?int $initialValue Numeric row index
33 */
34 public function __construct(?int $initialValue = null)
35 {
36 // set dimension as unformatted by default
37 $this->xfIndex = $initialValue;
38 }
39
40 /**
41 * Get Visible.
42 */
43 public function getVisible(): bool
44 {
45 return $this->visible;
46 }
47
48 /**
49 * Set Visible.
50 *
51 * @return $this
52 */
53 public function setVisible(bool $visible)
54 {
55 $this->visible = $visible;
56
57 return $this;
58 }
59
60 /**
61 * Get Outline Level.
62 */
63 public function getOutlineLevel(): int
64 {
65 return $this->outlineLevel;
66 }
67
68 /**
69 * Set Outline Level.
70 * Value must be between 0 and 7.
71 *
72 * @return $this
73 */
74 public function setOutlineLevel(int $level)
75 {
76 if ($level < 0 || $level > 7) {
77 throw new PhpSpreadsheetException('Outline level must range between 0 and 7.');
78 }
79
80 $this->outlineLevel = $level;
81
82 return $this;
83 }
84
85 /**
86 * Get Collapsed.
87 */
88 public function getCollapsed(): bool
89 {
90 return $this->collapsed;
91 }
92
93 /**
94 * Set Collapsed.
95 *
96 * @return $this
97 */
98 public function setCollapsed(bool $collapsed)
99 {
100 $this->collapsed = $collapsed;
101
102 return $this;
103 }
104
105 /**
106 * Get index to cellXf.
107 */
108 public function getXfIndex(): ?int
109 {
110 return $this->xfIndex;
111 }
112
113 /**
114 * Set index to cellXf.
115 *
116 * @return $this
117 */
118 public function setXfIndex(int $XfIndex)
119 {
120 $this->xfIndex = $XfIndex;
121
122 return $this;
123 }
124 }
125