ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Dimension.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
7 abstract class Dimension
8 {
14  private $visible = true;
15 
21  private $outlineLevel = 0;
22 
28  private $collapsed = false;
29 
35  private $xfIndex;
36 
42  public function __construct($initialValue = null)
43  {
44  // set dimension as unformatted by default
45  $this->xfIndex = $initialValue;
46  }
47 
51  public function getVisible(): bool
52  {
53  return $this->visible;
54  }
55 
61  public function setVisible(bool $visible)
62  {
63  $this->visible = $visible;
64 
65  return $this;
66  }
67 
71  public function getOutlineLevel(): int
72  {
73  return $this->outlineLevel;
74  }
75 
82  public function setOutlineLevel(int $level)
83  {
84  if ($level < 0 || $level > 7) {
85  throw new PhpSpreadsheetException('Outline level must range between 0 and 7.');
86  }
87 
88  $this->outlineLevel = $level;
89 
90  return $this;
91  }
92 
96  public function getCollapsed(): bool
97  {
98  return $this->collapsed;
99  }
100 
106  public function setCollapsed(bool $collapsed)
107  {
108  $this->collapsed = $collapsed;
109 
110  return $this;
111  }
112 
118  public function getXfIndex(): ?int
119  {
120  return $this->xfIndex;
121  }
122 
128  public function setXfIndex(int $pValue)
129  {
130  $this->xfIndex = $pValue;
131 
132  return $this;
133  }
134 
138  public function __clone()
139  {
140  $vars = get_object_vars($this);
141  foreach ($vars as $key => $value) {
142  if (is_object($value)) {
143  $this->$key = clone $value;
144  } else {
145  $this->$key = $value;
146  }
147  }
148  }
149 }
setVisible(bool $visible)
Set Visible.
Definition: Dimension.php:61
setCollapsed(bool $collapsed)
Set Collapsed.
Definition: Dimension.php:106
__construct($initialValue=null)
Create a new Dimension.
Definition: Dimension.php:42
setXfIndex(int $pValue)
Set index to cellXf.
Definition: Dimension.php:128
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition: Dimension.php:138
setOutlineLevel(int $level)
Set Outline Level.
Definition: Dimension.php:82
$key
Definition: croninfo.php:18