ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ColumnDimension.php
Go to the documentation of this file.
1 <?php
37 {
43  private $_columnIndex;
44 
52  private $_width = -1;
53 
59  private $_autoSize = false;
60 
66  private $_visible = true;
67 
73  private $_outlineLevel = 0;
74 
80  private $_collapsed = false;
81 
87  private $_xfIndex;
88 
94  public function __construct($pIndex = 'A')
95  {
96  // Initialise values
97  $this->_columnIndex = $pIndex;
98 
99  // set default index to cellXf
100  $this->_xfIndex = 0;
101  }
102 
108  public function getColumnIndex() {
109  return $this->_columnIndex;
110  }
111 
118  public function setColumnIndex($pValue) {
119  $this->_columnIndex = $pValue;
120  return $this;
121  }
122 
128  public function getWidth() {
129  return $this->_width;
130  }
131 
138  public function setWidth($pValue = -1) {
139  $this->_width = $pValue;
140  return $this;
141  }
142 
148  public function getAutoSize() {
149  return $this->_autoSize;
150  }
151 
158  public function setAutoSize($pValue = false) {
159  $this->_autoSize = $pValue;
160  return $this;
161  }
162 
168  public function getVisible() {
169  return $this->_visible;
170  }
171 
178  public function setVisible($pValue = true) {
179  $this->_visible = $pValue;
180  return $this;
181  }
182 
188  public function getOutlineLevel() {
189  return $this->_outlineLevel;
190  }
191 
201  public function setOutlineLevel($pValue) {
202  if ($pValue < 0 || $pValue > 7) {
203  throw new PHPExcel_Exception("Outline level must range between 0 and 7.");
204  }
205 
206  $this->_outlineLevel = $pValue;
207  return $this;
208  }
209 
215  public function getCollapsed() {
216  return $this->_collapsed;
217  }
218 
225  public function setCollapsed($pValue = true) {
226  $this->_collapsed = $pValue;
227  return $this;
228  }
229 
235  public function getXfIndex()
236  {
237  return $this->_xfIndex;
238  }
239 
246  public function setXfIndex($pValue = 0)
247  {
248  $this->_xfIndex = $pValue;
249  return $this;
250  }
251 
255  public function __clone() {
256  $vars = get_object_vars($this);
257  foreach ($vars as $key => $value) {
258  if (is_object($value)) {
259  $this->$key = clone $value;
260  } else {
261  $this->$key = $value;
262  }
263  }
264  }
265 
266 }
setVisible($pValue=true)
Set Visible.
setCollapsed($pValue=true)
Set Collapsed.
setOutlineLevel($pValue)
Set Outline Level.
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
setColumnIndex($pValue)
Set ColumnIndex.
setXfIndex($pValue=0)
Set index to cellXf.
__construct($pIndex='A')
Create a new PHPExcel_Worksheet_ColumnDimension.
setAutoSize($pValue=false)
Set Auto Size.