ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ColumnDimension.php
Go to the documentation of this file.
1 <?php
37 {
43  private $_columnIndex;
44 
52  private $_width;
53 
59  private $_autoSize;
60 
66  private $_visible;
67 
73  private $_outlineLevel = 0;
74 
80  private $_collapsed;
81 
87  public function __construct($pIndex = 'A')
88  {
89  // Initialise values
90  $this->_columnIndex = $pIndex;
91  $this->_width = -1;
92  $this->_autoSize = false;
93  $this->_visible = true;
94  $this->_outlineLevel = 0;
95  $this->_collapsed = false;
96  }
97 
103  public function getColumnIndex() {
104  return $this->_columnIndex;
105  }
106 
113  public function setColumnIndex($pValue) {
114  $this->_columnIndex = $pValue;
115  return $this;
116  }
117 
123  public function getWidth() {
124  return $this->_width;
125  }
126 
133  public function setWidth($pValue = -1) {
134  $this->_width = $pValue;
135  return $this;
136  }
137 
143  public function getAutoSize() {
144  return $this->_autoSize;
145  }
146 
153  public function setAutoSize($pValue = false) {
154  $this->_autoSize = $pValue;
155  return $this;
156  }
157 
163  public function getVisible() {
164  return $this->_visible;
165  }
166 
173  public function setVisible($pValue = true) {
174  $this->_visible = $pValue;
175  return $this;
176  }
177 
183  public function getOutlineLevel() {
184  return $this->_outlineLevel;
185  }
186 
196  public function setOutlineLevel($pValue) {
197  if ($pValue < 0 || $pValue > 7) {
198  throw new Exception("Outline level must range between 0 and 7.");
199  }
200 
201  $this->_outlineLevel = $pValue;
202  return $this;
203  }
204 
210  public function getCollapsed() {
211  return $this->_collapsed;
212  }
213 
220  public function setCollapsed($pValue = true) {
221  $this->_collapsed = $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 }