composer update
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* Copyright (c) 2006 - 2014 PHPExcel
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -20,19 +21,10 @@
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Cell
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Cell_DataValidation
|
||||
{
|
||||
/* Data validation types */
|
||||
@@ -65,91 +57,91 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_formula1;
|
||||
private $formula1;
|
||||
|
||||
/**
|
||||
* Formula 2
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_formula2;
|
||||
private $formula2;
|
||||
|
||||
/**
|
||||
* Type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
||||
private $type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
||||
|
||||
/**
|
||||
* Error style
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
||||
private $errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
||||
|
||||
/**
|
||||
* Operator
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_operator;
|
||||
private $operator;
|
||||
|
||||
/**
|
||||
* Allow Blank
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_allowBlank;
|
||||
private $allowBlank;
|
||||
|
||||
/**
|
||||
* Show DropDown
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_showDropDown;
|
||||
private $showDropDown;
|
||||
|
||||
/**
|
||||
* Show InputMessage
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_showInputMessage;
|
||||
private $showInputMessage;
|
||||
|
||||
/**
|
||||
* Show ErrorMessage
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_showErrorMessage;
|
||||
private $showErrorMessage;
|
||||
|
||||
/**
|
||||
* Error title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_errorTitle;
|
||||
private $errorTitle;
|
||||
|
||||
/**
|
||||
* Error
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_error;
|
||||
private $error;
|
||||
|
||||
/**
|
||||
* Prompt title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_promptTitle;
|
||||
private $promptTitle;
|
||||
|
||||
/**
|
||||
* Prompt
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_prompt;
|
||||
private $prompt;
|
||||
|
||||
/**
|
||||
* Create a new PHPExcel_Cell_DataValidation
|
||||
@@ -157,19 +149,19 @@ class PHPExcel_Cell_DataValidation
|
||||
public function __construct()
|
||||
{
|
||||
// Initialise member variables
|
||||
$this->_formula1 = '';
|
||||
$this->_formula2 = '';
|
||||
$this->_type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
||||
$this->_errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
||||
$this->_operator = '';
|
||||
$this->_allowBlank = FALSE;
|
||||
$this->_showDropDown = FALSE;
|
||||
$this->_showInputMessage = FALSE;
|
||||
$this->_showErrorMessage = FALSE;
|
||||
$this->_errorTitle = '';
|
||||
$this->_error = '';
|
||||
$this->_promptTitle = '';
|
||||
$this->_prompt = '';
|
||||
$this->formula1 = '';
|
||||
$this->formula2 = '';
|
||||
$this->type = PHPExcel_Cell_DataValidation::TYPE_NONE;
|
||||
$this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP;
|
||||
$this->operator = '';
|
||||
$this->allowBlank = false;
|
||||
$this->showDropDown = false;
|
||||
$this->showInputMessage = false;
|
||||
$this->showErrorMessage = false;
|
||||
$this->errorTitle = '';
|
||||
$this->error = '';
|
||||
$this->promptTitle = '';
|
||||
$this->prompt = '';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,8 +169,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFormula1() {
|
||||
return $this->_formula1;
|
||||
public function getFormula1()
|
||||
{
|
||||
return $this->formula1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,8 +180,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setFormula1($value = '') {
|
||||
$this->_formula1 = $value;
|
||||
public function setFormula1($value = '')
|
||||
{
|
||||
$this->formula1 = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -197,8 +191,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFormula2() {
|
||||
return $this->_formula2;
|
||||
public function getFormula2()
|
||||
{
|
||||
return $this->formula2;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,8 +202,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setFormula2($value = '') {
|
||||
$this->_formula2 = $value;
|
||||
public function setFormula2($value = '')
|
||||
{
|
||||
$this->formula2 = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -217,8 +213,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType() {
|
||||
return $this->_type;
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,8 +224,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setType($value = PHPExcel_Cell_DataValidation::TYPE_NONE) {
|
||||
$this->_type = $value;
|
||||
public function setType($value = PHPExcel_Cell_DataValidation::TYPE_NONE)
|
||||
{
|
||||
$this->type = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -237,8 +235,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getErrorStyle() {
|
||||
return $this->_errorStyle;
|
||||
public function getErrorStyle()
|
||||
{
|
||||
return $this->errorStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -247,8 +246,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setErrorStyle($value = PHPExcel_Cell_DataValidation::STYLE_STOP) {
|
||||
$this->_errorStyle = $value;
|
||||
public function setErrorStyle($value = PHPExcel_Cell_DataValidation::STYLE_STOP)
|
||||
{
|
||||
$this->errorStyle = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -257,8 +257,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOperator() {
|
||||
return $this->_operator;
|
||||
public function getOperator()
|
||||
{
|
||||
return $this->operator;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -267,8 +268,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setOperator($value = '') {
|
||||
$this->_operator = $value;
|
||||
public function setOperator($value = '')
|
||||
{
|
||||
$this->operator = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -277,8 +279,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAllowBlank() {
|
||||
return $this->_allowBlank;
|
||||
public function getAllowBlank()
|
||||
{
|
||||
return $this->allowBlank;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,8 +290,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param boolean $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setAllowBlank($value = false) {
|
||||
$this->_allowBlank = $value;
|
||||
public function setAllowBlank($value = false)
|
||||
{
|
||||
$this->allowBlank = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -297,8 +301,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getShowDropDown() {
|
||||
return $this->_showDropDown;
|
||||
public function getShowDropDown()
|
||||
{
|
||||
return $this->showDropDown;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,8 +312,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param boolean $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setShowDropDown($value = false) {
|
||||
$this->_showDropDown = $value;
|
||||
public function setShowDropDown($value = false)
|
||||
{
|
||||
$this->showDropDown = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -317,8 +323,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getShowInputMessage() {
|
||||
return $this->_showInputMessage;
|
||||
public function getShowInputMessage()
|
||||
{
|
||||
return $this->showInputMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -327,8 +334,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param boolean $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setShowInputMessage($value = false) {
|
||||
$this->_showInputMessage = $value;
|
||||
public function setShowInputMessage($value = false)
|
||||
{
|
||||
$this->showInputMessage = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -337,8 +345,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getShowErrorMessage() {
|
||||
return $this->_showErrorMessage;
|
||||
public function getShowErrorMessage()
|
||||
{
|
||||
return $this->showErrorMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -347,8 +356,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param boolean $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setShowErrorMessage($value = false) {
|
||||
$this->_showErrorMessage = $value;
|
||||
public function setShowErrorMessage($value = false)
|
||||
{
|
||||
$this->showErrorMessage = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -357,8 +367,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getErrorTitle() {
|
||||
return $this->_errorTitle;
|
||||
public function getErrorTitle()
|
||||
{
|
||||
return $this->errorTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -367,8 +378,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setErrorTitle($value = '') {
|
||||
$this->_errorTitle = $value;
|
||||
public function setErrorTitle($value = '')
|
||||
{
|
||||
$this->errorTitle = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -377,8 +389,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getError() {
|
||||
return $this->_error;
|
||||
public function getError()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -387,8 +400,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setError($value = '') {
|
||||
$this->_error = $value;
|
||||
public function setError($value = '')
|
||||
{
|
||||
$this->error = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -397,8 +411,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPromptTitle() {
|
||||
return $this->_promptTitle;
|
||||
public function getPromptTitle()
|
||||
{
|
||||
return $this->promptTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,8 +422,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setPromptTitle($value = '') {
|
||||
$this->_promptTitle = $value;
|
||||
public function setPromptTitle($value = '')
|
||||
{
|
||||
$this->promptTitle = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -417,8 +433,9 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPrompt() {
|
||||
return $this->_prompt;
|
||||
public function getPrompt()
|
||||
{
|
||||
return $this->prompt;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -427,8 +444,9 @@ class PHPExcel_Cell_DataValidation
|
||||
* @param string $value
|
||||
* @return PHPExcel_Cell_DataValidation
|
||||
*/
|
||||
public function setPrompt($value = '') {
|
||||
$this->_prompt = $value;
|
||||
public function setPrompt($value = '')
|
||||
{
|
||||
$this->prompt = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -437,29 +455,31 @@ class PHPExcel_Cell_DataValidation
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode() {
|
||||
public function getHashCode()
|
||||
{
|
||||
return md5(
|
||||
$this->_formula1
|
||||
. $this->_formula2
|
||||
. $this->_type = PHPExcel_Cell_DataValidation::TYPE_NONE
|
||||
. $this->_errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP
|
||||
. $this->_operator
|
||||
. ($this->_allowBlank ? 't' : 'f')
|
||||
. ($this->_showDropDown ? 't' : 'f')
|
||||
. ($this->_showInputMessage ? 't' : 'f')
|
||||
. ($this->_showErrorMessage ? 't' : 'f')
|
||||
. $this->_errorTitle
|
||||
. $this->_error
|
||||
. $this->_promptTitle
|
||||
. $this->_prompt
|
||||
. __CLASS__
|
||||
$this->formula1 .
|
||||
$this->formula2 .
|
||||
$this->type = PHPExcel_Cell_DataValidation::TYPE_NONE .
|
||||
$this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP .
|
||||
$this->operator .
|
||||
($this->allowBlank ? 't' : 'f') .
|
||||
($this->showDropDown ? 't' : 'f') .
|
||||
($this->showInputMessage ? 't' : 'f') .
|
||||
($this->showErrorMessage ? 't' : 'f') .
|
||||
$this->errorTitle .
|
||||
$this->error .
|
||||
$this->promptTitle .
|
||||
$this->prompt .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||
*/
|
||||
public function __clone() {
|
||||
public function __clone()
|
||||
{
|
||||
$vars = get_object_vars($this);
|
||||
foreach ($vars as $key => $value) {
|
||||
if (is_object($value)) {
|
||||
|
Reference in New Issue
Block a user