57 self::AUTOFILTER_FILTERTYPE_FILTER,
58 self::AUTOFILTER_FILTERTYPE_CUSTOMFILTER,
59 self::AUTOFILTER_FILTERTYPE_DYNAMICFILTER,
60 self::AUTOFILTER_FILTERTYPE_TOPTENFILTER,
73 self::AUTOFILTER_COLUMN_JOIN_AND,
74 self::AUTOFILTER_COLUMN_JOIN_OR,
106 private $_join = self::AUTOFILTER_COLUMN_JOIN_OR;
133 $this->_columnIndex = $pColumn;
134 $this->_parent = $pParent;
155 $pColumn = strtoupper($pColumn);
156 if ($this->_parent !== NULL) {
157 $this->_parent->testColumnInRange($pColumn);
160 $this->_columnIndex = $pColumn;
181 $this->_parent = $pParent;
202 public function setFilterType($pFilterType = self::AUTOFILTER_FILTERTYPE_FILTER) {
203 if (!in_array($pFilterType,self::$_filterTypes)) {
207 $this->_filterType = $pFilterType;
228 public function setJoin($pJoin = self::AUTOFILTER_COLUMN_JOIN_OR) {
230 $pJoin = strtolower($pJoin);
231 if (!in_array($pJoin,self::$_ruleJoins)) {
235 $this->_join = $pJoin;
248 $this->_attributes = $pAttributes;
262 $this->_attributes[$pName] = $pValue;
283 if (isset($this->_attributes[$pName]))
284 return $this->_attributes[$pName];
305 if (!isset($this->_ruleset[$pIndex])) {
308 return $this->_ruleset[$pIndex];
319 return end($this->_ruleset);
331 $this->_ruleset[] = $pRule;
333 return ($returnRule) ? $pRule : $this;
344 if (isset($this->_ruleset[$pIndex])) {
345 unset($this->_ruleset[$pIndex]);
347 if (count($this->_ruleset) <= 1) {
348 $this->
setJoin(self::AUTOFILTER_COLUMN_JOIN_OR);
361 $this->_ruleset =
array();
362 $this->
setJoin(self::AUTOFILTER_COLUMN_JOIN_OR);
371 $vars = get_object_vars($this);
372 foreach ($vars as $key => $value) {
373 if (is_object($value)) {
374 if ($key ==
'_parent') {
378 $this->$key = clone $value;
380 } elseif ((is_array($value)) && ($key ==
'_ruleset')) {
382 $this->$key =
array();
383 foreach ($value as $k => $v) {
384 $this->$key[$k] = clone $v;
386 $this->$key[$k]->setParent($this);
389 $this->$key = $value;
setAttributes($pAttributes=array())
Set AutoFilter Attributes.
setFilterType($pFilterType=self::AUTOFILTER_FILTERTYPE_FILTER)
Set AutoFilter Type.
getRule($pIndex)
Get a specified AutoFilter Column Rule.
const AUTOFILTER_FILTERTYPE_TOPTENFILTER
createRule()
Create a new AutoFilter Column Rule in the ruleset.
setParent(PHPExcel_Worksheet_AutoFilter $pParent=NULL)
Set this Column's AutoFilter Parent.
getAttributes()
Get AutoFilter Column Attributes.
setParent(PHPExcel_Worksheet_AutoFilter_Column $pParent=NULL)
Set this Rule's AutoFilter Column Parent.
getFilterType()
Get AutoFilter Type.
setJoin($pJoin=self::AUTOFILTER_COLUMN_JOIN_OR)
Set AutoFilter Multiple Rules And/Or.
getParent()
Get this Column's AutoFilter Parent.
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
const AUTOFILTER_FILTERTYPE_FILTER
setColumnIndex($pColumn)
Set AutoFilter Column Index.
clearRules()
Delete all AutoFilter Column Rules.
deleteRule($pIndex)
Delete a specified AutoFilter Column Rule If the number of rules is reduced to 1, then we reset And/O...
getRules()
Get all AutoFilter Column Rules.
const AUTOFILTER_FILTERTYPE_CUSTOMFILTER
getColumnIndex()
Get AutoFilter Column Index.
addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule=TRUE)
Add a new AutoFilter Column Rule to the ruleset.
getAttribute($pName)
Get specific AutoFilter Column Attribute.
getJoin()
Get AutoFilter Multiple Rules And/Or Join.
const AUTOFILTER_COLUMN_JOIN_OR
setAttribute($pName, $pValue)
Set An AutoFilter Attribute.
const AUTOFILTER_COLUMN_JOIN_AND
Create styles array
The data for the language used.
__construct($pColumn, PHPExcel_Worksheet_AutoFilter $pParent=NULL)
Create a new PHPExcel_Worksheet_AutoFilter_Column.
const AUTOFILTER_FILTERTYPE_DYNAMICFILTER