Source for file Protection.php
Documentation is available at Protection.php
* Copyright (c) 2006 - 2011 PHPExcel
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* @package PHPExcel_Worksheet
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.6, 2011-02-27
* PHPExcel_Worksheet_Protection
* @package PHPExcel_Worksheet
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
private $_objects = false;
private $_scenarios = false;
private $_formatCells = false;
private $_formatColumns = false;
private $_formatRows = false;
private $_insertColumns = false;
private $_insertRows = false;
private $_insertHyperlinks = false;
private $_deleteColumns = false;
private $_deleteRows = false;
private $_selectLockedCells = false;
private $_autoFilter = false;
private $_pivotTables = false;
private $_selectUnlockedCells = false;
* Create a new PHPExcel_Worksheet_Protection
* Is some sort of protection enabled?
$this->_insertHyperlinks ||
$this->_selectLockedCells ||
$this->_selectUnlockedCells;
* @return PHPExcel_Worksheet_Protection
* @return PHPExcel_Worksheet_Protection
$this->_objects = $pValue;
return $this->_scenarios;
* @return PHPExcel_Worksheet_Protection
$this->_scenarios = $pValue;
return $this->_formatCells;
* @return PHPExcel_Worksheet_Protection
$this->_formatCells = $pValue;
return $this->_formatColumns;
* @return PHPExcel_Worksheet_Protection
$this->_formatColumns = $pValue;
return $this->_formatRows;
* @return PHPExcel_Worksheet_Protection
$this->_formatRows = $pValue;
return $this->_insertColumns;
* @return PHPExcel_Worksheet_Protection
$this->_insertColumns = $pValue;
return $this->_insertRows;
* @return PHPExcel_Worksheet_Protection
$this->_insertRows = $pValue;
return $this->_insertHyperlinks;
* @return PHPExcel_Worksheet_Protection
$this->_insertHyperlinks = $pValue;
return $this->_deleteColumns;
* @return PHPExcel_Worksheet_Protection
$this->_deleteColumns = $pValue;
return $this->_deleteRows;
* @return PHPExcel_Worksheet_Protection
$this->_deleteRows = $pValue;
return $this->_selectLockedCells;
* @return PHPExcel_Worksheet_Protection
$this->_selectLockedCells = $pValue;
* @return PHPExcel_Worksheet_Protection
function setSort($pValue = false) {
return $this->_autoFilter;
* @return PHPExcel_Worksheet_Protection
$this->_autoFilter = $pValue;
return $this->_pivotTables;
* @return PHPExcel_Worksheet_Protection
$this->_pivotTables = $pValue;
* Get SelectUnlockedCells
return $this->_selectUnlockedCells;
* Set SelectUnlockedCells
* @return PHPExcel_Worksheet_Protection
$this->_selectUnlockedCells = $pValue;
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @return PHPExcel_Worksheet_Protection
function setPassword($pValue = '', $pAlreadyHashed = false) {
$this->_password = $pValue;
* Implement PHP __clone to create a deep clone, not just a shallow copy.
foreach ($vars as $key => $value) {
$this->$key = clone $value;
|