49 self::AUTOFILTER_RULETYPE_FILTER,
50 self::AUTOFILTER_RULETYPE_DATEGROUP,
51 self::AUTOFILTER_RULETYPE_CUSTOMFILTER,
52 self::AUTOFILTER_RULETYPE_DYNAMICFILTER,
53 self::AUTOFILTER_RULETYPE_TOPTENFILTER,
64 self::AUTOFILTER_RULETYPE_DATEGROUP_YEAR,
65 self::AUTOFILTER_RULETYPE_DATEGROUP_MONTH,
66 self::AUTOFILTER_RULETYPE_DATEGROUP_DAY,
67 self::AUTOFILTER_RULETYPE_DATEGROUP_HOUR,
68 self::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE,
69 self::AUTOFILTER_RULETYPE_DATEGROUP_SECOND,
120 self::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY,
121 self::AUTOFILTER_RULETYPE_DYNAMIC_TODAY,
122 self::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW,
123 self::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE,
124 self::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR,
125 self::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER,
126 self::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH,
127 self::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK,
128 self::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR,
129 self::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER,
130 self::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH,
131 self::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK,
132 self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR,
133 self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER,
134 self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH,
135 self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK,
136 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1,
137 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2,
138 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3,
139 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4,
140 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5,
141 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6,
142 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7,
143 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8,
144 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9,
145 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10,
146 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11,
147 self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12,
148 self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1,
149 self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2,
150 self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3,
151 self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4,
152 self::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE,
153 self::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE,
173 self::AUTOFILTER_COLUMN_RULE_EQUAL,
174 self::AUTOFILTER_COLUMN_RULE_NOTEQUAL,
175 self::AUTOFILTER_COLUMN_RULE_GREATERTHAN,
176 self::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
177 self::AUTOFILTER_COLUMN_RULE_LESSTHAN,
178 self::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,
185 self::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE,
186 self::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT,
193 self::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP,
194 self::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM,
277 $this->_parent = $pParent;
296 public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER) {
297 if (!in_array($pRuleType,self::$_ruleTypes)) {
301 $this->_ruleType = $pRuleType;
323 if (is_array($pValue)) {
325 foreach($pValue as $key => $value) {
327 if (!in_array($key,self::$_dateTimeGroups)) {
329 unset($pValue[$key]);
332 $grouping = max($grouping,array_search($key,self::$_dateTimeGroups));
335 if (count($pValue) == 0) {
339 $this->
setGrouping(self::$_dateTimeGroups[$grouping]);
341 $this->_value = $pValue;
362 public function setOperator($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL) {
363 if (empty($pOperator))
364 $pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL;
365 if ((!in_array($pOperator,self::$_operators)) &&
366 (!in_array($pOperator,self::$_topTenValue))) {
369 $this->_operator = $pOperator;
391 if (($pGrouping !== NULL) &&
392 (!in_array($pGrouping,self::$_dateTimeGroups)) &&
393 (!in_array($pGrouping,self::$_dynamicTypes)) &&
394 (!in_array($pGrouping,self::$_topTenType))) {
398 $this->_grouping = $pGrouping;
412 public function setRule($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL, $pValue =
'', $pGrouping = NULL) {
418 if ($pGrouping !== NULL)
440 $this->_parent = $pParent;
449 $vars = get_object_vars($this);
450 foreach ($vars as $key => $value) {
451 if (is_object($value)) {
452 if ($key ==
'_parent') {
456 $this->$key = clone $value;
459 $this->$key = $value;
const AUTOFILTER_RULETYPE_DATEGROUP_HOUR
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9
const AUTOFILTER_RULETYPE_DATEGROUP_SECOND
const AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT
const AUTOFILTER_RULETYPE_DATEGROUP_YEAR
const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2
const AUTOFILTER_RULETYPE_CUSTOMFILTER
const AUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER
const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3
const AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11
const AUTOFILTER_RULETYPE_DYNAMIC_APRIL
const AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE
const AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW
getGrouping()
Get AutoFilter Rule Grouping.
setParent(PHPExcel_Worksheet_AutoFilter_Column $pParent=NULL)
Set this Rule's AutoFilter Column Parent.
const AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER
const AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
const AUTOFILTER_RULETYPE_DYNAMIC_MAY
const AUTOFILTER_RULETYPE_DYNAMIC_JUNE
const AUTOFILTER_RULETYPE_DYNAMIC_JULY
const AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR
const AUTOFILTER_RULETYPE_DATEGROUP
const AUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER
const AUTOFILTER_RULETYPE_DYNAMIC_AUGUST
const AUTOFILTER_RULETYPE_DYNAMIC_DECEMBER
getOperator()
Get AutoFilter Rule Operator.
const AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR
const AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE
const AUTOFILTER_COLUMN_RULE_GREATERTHAN
getRuleType()
Get AutoFilter Rule Type.
const AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10
const AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH
setRule($pOperator=self::AUTOFILTER_COLUMN_RULE_EQUAL, $pValue='', $pGrouping=NULL)
Set AutoFilter Rule.
const AUTOFILTER_COLUMN_RULE_LESSTHAN
const AUTOFILTER_RULETYPE_DYNAMIC_OCTOBER
setValue($pValue='')
Set AutoFilter Rule Value.
const AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER
const AUTOFILTER_RULETYPE_DATEGROUP_MINUTE
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6
const AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
const AUTOFILTER_RULETYPE_TOPTENFILTER
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8
const AUTOFILTER_COLUMN_RULE_TOPTEN_TOP
const AUTOFILTER_COLUMN_RULE_EQUAL
const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4
setRuleType($pRuleType=self::AUTOFILTER_RULETYPE_FILTER)
Set AutoFilter Rule Type.
const AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY
const AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL
__construct(PHPExcel_Worksheet_AutoFilter_Column $pParent=NULL)
Create a new PHPExcel_Worksheet_AutoFilter_Column_Rule.
const AUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY
Create styles array
The data for the language used.
const AUTOFILTER_RULETYPE_DYNAMIC_TODAY
const AUTOFILTER_RULETYPE_DYNAMIC_MARCH
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12
const AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER
const AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK
const AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE
const AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL
setGrouping($pGrouping=NULL)
Set AutoFilter Rule Grouping.
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2
const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4
getParent()
Get this Rule's AutoFilter Column Parent.
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5
const AUTOFILTER_RULETYPE_DYNAMICFILTER
const AUTOFILTER_COLUMN_RULE_NOTEQUAL
const AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR
const AUTOFILTER_RULETYPE_FILTER
const AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH
const AUTOFILTER_RULETYPE_DATEGROUP_DAY
const AUTOFILTER_RULETYPE_DYNAMIC_JANUARY
getValue()
Get AutoFilter Rule Value.
const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1
const AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK
setOperator($pOperator=self::AUTOFILTER_COLUMN_RULE_EQUAL)
Set AutoFilter Rule Operator.
const AUTOFILTER_RULETYPE_DATEGROUP_MONTH