PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.1
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Worksheet / Dimension.php

Dimension.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.7.1, at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php

166 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Worksheet;
4
5 use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
6
7 abstract class Dimension
8 {
9 /**
10 * Visible?
11 *
12 * @var bool
13 */
14 private $visible = true;
15
16 /**
17 * Outline level.
18 *
19 * @var int
20 */
21 private $outlineLevel = 0;
22
23 /**
24 * Collapsed.
25 *
26 * @var bool
27 */
28 private $collapsed = false;
29
30 /**
31 * Index to cellXf. Null value means row has no explicit cellXf format.
32 *
33 * @var null|int
34 */
35 private $xfIndex;
36
37 /**
38 * Create a new Dimension.
39 *
40 * @param int $initialValue Numeric row index
41 */
42 public function __construct($initialValue = null)
43 {
44 // set dimension as unformatted by default
45 $this->xfIndex = $initialValue;
46 }
47
48 /**
49 * Get Visible.
50 *
51 * @return bool
52 */
53 public function getVisible()
54 {
55 return $this->visible;
56 }
57
58 /**
59 * Set Visible.
60 *
61 * @param bool $pValue
62 *
63 * @return Dimension
64 */
65 public function setVisible($pValue)
66 {
67 $this->visible = (bool) $pValue;
68
69 return $this;
70 }
71
72 /**
73 * Get Outline Level.
74 *
75 * @return int
76 */
77 public function getOutlineLevel()
78 {
79 return $this->outlineLevel;
80 }
81
82 /**
83 * Set Outline Level.
84 * Value must be between 0 and 7.
85 *
86 * @param int $pValue
87 *
88 * @throws PhpSpreadsheetException
89 *
90 * @return Dimension
91 */
92 public function setOutlineLevel($pValue)
93 {
94 if ($pValue < 0 || $pValue > 7) {
95 throw new PhpSpreadsheetException('Outline level must range between 0 and 7.');
96 }
97
98 $this->outlineLevel = $pValue;
99
100 return $this;
101 }
102
103 /**
104 * Get Collapsed.
105 *
106 * @return bool
107 */
108 public function getCollapsed()
109 {
110 return $this->collapsed;
111 }
112
113 /**
114 * Set Collapsed.
115 *
116 * @param bool $pValue
117 *
118 * @return Dimension
119 */
120 public function setCollapsed($pValue)
121 {
122 $this->collapsed = (bool) $pValue;
123
124 return $this;
125 }
126
127 /**
128 * Get index to cellXf.
129 *
130 * @return int
131 */
132 public function getXfIndex()
133 {
134 return $this->xfIndex;
135 }
136
137 /**
138 * Set index to cellXf.
139 *
140 * @param int $pValue
141 *
142 * @return Dimension
143 */
144 public function setXfIndex($pValue)
145 {
146 $this->xfIndex = $pValue;
147
148 return $this;
149 }
150
151 /**
152 * Implement PHP __clone to create a deep clone, not just a shallow copy.
153 */
154 public function __clone()
155 {
156 $vars = get_object_vars($this);
157 foreach ($vars as $key => $value) {
158 if (is_object($value)) {
159 $this->$key = clone $value;
160 } else {
161 $this->$key = $value;
162 }
163 }
164 }
165 }
166