[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_Worksheet_Dimension 5 * 6 * Copyright (c) 2006 - 2015 PHPExcel 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 * @category PHPExcel 23 * @package PHPExcel_Worksheet 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 26 * @version ##VERSION##, ##DATE## 27 */ 28 abstract class PHPExcel_Worksheet_Dimension 29 { 30 /** 31 * Visible? 32 * 33 * @var bool 34 */ 35 private $visible = true; 36 37 /** 38 * Outline level 39 * 40 * @var int 41 */ 42 private $outlineLevel = 0; 43 44 /** 45 * Collapsed 46 * 47 * @var bool 48 */ 49 private $collapsed = false; 50 51 /** 52 * Index to cellXf. Null value means row has no explicit cellXf format. 53 * 54 * @var int|null 55 */ 56 private $xfIndex; 57 58 /** 59 * Create a new PHPExcel_Worksheet_Dimension 60 * 61 * @param int $pIndex Numeric row index 62 */ 63 public function __construct($initialValue = null) 64 { 65 // set dimension as unformatted by default 66 $this->xfIndex = $initialValue; 67 } 68 69 /** 70 * Get Visible 71 * 72 * @return bool 73 */ 74 public function getVisible() 75 { 76 return $this->visible; 77 } 78 79 /** 80 * Set Visible 81 * 82 * @param bool $pValue 83 * @return PHPExcel_Worksheet_Dimension 84 */ 85 public function setVisible($pValue = true) 86 { 87 $this->visible = $pValue; 88 return $this; 89 } 90 91 /** 92 * Get Outline Level 93 * 94 * @return int 95 */ 96 public function getOutlineLevel() 97 { 98 return $this->outlineLevel; 99 } 100 101 /** 102 * Set Outline Level 103 * 104 * Value must be between 0 and 7 105 * 106 * @param int $pValue 107 * @throws PHPExcel_Exception 108 * @return PHPExcel_Worksheet_Dimension 109 */ 110 public function setOutlineLevel($pValue) 111 { 112 if ($pValue < 0 || $pValue > 7) { 113 throw new PHPExcel_Exception("Outline level must range between 0 and 7."); 114 } 115 116 $this->outlineLevel = $pValue; 117 return $this; 118 } 119 120 /** 121 * Get Collapsed 122 * 123 * @return bool 124 */ 125 public function getCollapsed() 126 { 127 return $this->collapsed; 128 } 129 130 /** 131 * Set Collapsed 132 * 133 * @param bool $pValue 134 * @return PHPExcel_Worksheet_Dimension 135 */ 136 public function setCollapsed($pValue = true) 137 { 138 $this->collapsed = $pValue; 139 return $this; 140 } 141 142 /** 143 * Get index to cellXf 144 * 145 * @return int 146 */ 147 public function getXfIndex() 148 { 149 return $this->xfIndex; 150 } 151 152 /** 153 * Set index to cellXf 154 * 155 * @param int $pValue 156 * @return PHPExcel_Worksheet_Dimension 157 */ 158 public function setXfIndex($pValue = 0) 159 { 160 $this->xfIndex = $pValue; 161 return $this; 162 } 163 164 /** 165 * Implement PHP __clone to create a deep clone, not just a shallow copy. 166 */ 167 public function __clone() 168 { 169 $vars = get_object_vars($this); 170 foreach ($vars as $key => $value) { 171 if (is_object($value)) { 172 $this->$key = clone $value; 173 } else { 174 $this->$key = $value; 175 } 176 } 177 } 178 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |