ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
RowDimension.php
Go to the documentation of this file.
1 <?php
37 {
43  private $_rowIndex;
44 
52  private $_rowHeight = -1;
53 
59  private $_visible = true;
60 
66  private $_outlineLevel = 0;
67 
73  private $_collapsed = false;
74 
80  private $_xfIndex;
81 
87  public function __construct($pIndex = 0)
88  {
89  // Initialise values
90  $this->_rowIndex = $pIndex;
91 
92  // set row dimension as unformatted by default
93  $this->_xfIndex = null;
94  }
95 
101  public function getRowIndex() {
102  return $this->_rowIndex;
103  }
104 
111  public function setRowIndex($pValue) {
112  $this->_rowIndex = $pValue;
113  return $this;
114  }
115 
121  public function getRowHeight() {
122  return $this->_rowHeight;
123  }
124 
131  public function setRowHeight($pValue = -1) {
132  $this->_rowHeight = $pValue;
133  return $this;
134  }
135 
141  public function getVisible() {
142  return $this->_visible;
143  }
144 
151  public function setVisible($pValue = true) {
152  $this->_visible = $pValue;
153  return $this;
154  }
155 
161  public function getOutlineLevel() {
162  return $this->_outlineLevel;
163  }
164 
174  public function setOutlineLevel($pValue) {
175  if ($pValue < 0 || $pValue > 7) {
176  throw new Exception("Outline level must range between 0 and 7.");
177  }
178 
179  $this->_outlineLevel = $pValue;
180  return $this;
181  }
182 
188  public function getCollapsed() {
189  return $this->_collapsed;
190  }
191 
198  public function setCollapsed($pValue = true) {
199  $this->_collapsed = $pValue;
200  return $this;
201  }
202 
208  public function getXfIndex()
209  {
210  return $this->_xfIndex;
211  }
212 
219  public function setXfIndex($pValue = 0)
220  {
221  $this->_xfIndex = $pValue;
222  return $this;
223  }
224 
228  public function __clone() {
229  $vars = get_object_vars($this);
230  foreach ($vars as $key => $value) {
231  if (is_object($value)) {
232  $this->$key = clone $value;
233  } else {
234  $this->$key = $value;
235  }
236  }
237  }
238 }