Source for file Conditional.php
Documentation is available at Conditional.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_Style
* @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_Style_Conditional
* @package PHPExcel_Style
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
const CONDITION_NONE = 'none';
const CONDITION_CELLIS = 'cellIs';
const CONDITION_CONTAINSTEXT = 'containsText';
const CONDITION_EXPRESSION = 'expression';
const OPERATOR_NONE = '';
const OPERATOR_BEGINSWITH = 'beginsWith';
const OPERATOR_ENDSWITH = 'endsWith';
const OPERATOR_EQUAL = 'equal';
const OPERATOR_GREATERTHAN = 'greaterThan';
const OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual';
const OPERATOR_LESSTHAN = 'lessThan';
const OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual';
const OPERATOR_NOTEQUAL = 'notEqual';
const OPERATOR_CONTAINSTEXT = 'containsText';
const OPERATOR_NOTCONTAINS = 'notContains';
const OPERATOR_BETWEEN = 'between';
private $_condition = array();
* Create a new PHPExcel_Style_Conditional
$this->_condition = array();
return $this->_conditionType;
* @param string $pValue PHPExcel_Style_Conditional condition type
* @return PHPExcel_Style_Conditional
public function setConditionType($pValue = PHPExcel_Style_Conditional::CONDITION_NONE) {
$this->_conditionType = $pValue;
return $this->_operatorType;
* @param string $pValue PHPExcel_Style_Conditional operator type
* @return PHPExcel_Style_Conditional
public function setOperatorType($pValue = PHPExcel_Style_Conditional::OPERATOR_NONE) {
$this->_operatorType = $pValue;
* @return PHPExcel_Style_Conditional
public function setText($value = null) {
* @deprecated Deprecated, use getConditions instead
if (isset ($this->_condition[0])) {
return $this->_condition[0];
* @deprecated Deprecated, use setConditions instead
* @param string $pValue Condition
* @return PHPExcel_Style_Conditional
$pValue = array($pValue);
return $this->_condition;
* @param string[] $pValue Condition
* @return PHPExcel_Style_Conditional
$pValue = array($pValue);
$this->_condition = $pValue;
* @param string $pValue Condition
* @return PHPExcel_Style_Conditional
$this->_condition[] = $pValue;
* @param PHPExcel_Style $pValue
* @return PHPExcel_Style_Conditional
public function setStyle(PHPExcel_Style $pValue = null) {
* @return string Hash code
* Implement PHP __clone to create a deep clone, not just a shallow copy.
foreach ($vars as $key => $value) {
$this->$key = clone $value;
|