Conditional
in package
implements
IComparable
Table of Contents
Interfaces
Constants
- CONDITION_BEGINSWITH = 'beginsWith'
- CONDITION_CELLIS = 'cellIs'
- CONDITION_COLORSCALE = 'colorScale'
- CONDITION_CONTAINSBLANKS = 'containsBlanks'
- CONDITION_CONTAINSERRORS = 'containsErrors'
- CONDITION_CONTAINSTEXT = 'containsText'
- CONDITION_DATABAR = 'dataBar'
- CONDITION_DUPLICATES = 'duplicateValues'
- CONDITION_ENDSWITH = 'endsWith'
- CONDITION_EXPRESSION = 'expression'
- CONDITION_NONE = 'none'
- CONDITION_NOTCONTAINSBLANKS = 'notContainsBlanks'
- CONDITION_NOTCONTAINSERRORS = 'notContainsErrors'
- CONDITION_NOTCONTAINSTEXT = 'notContainsText'
- CONDITION_TIMEPERIOD = 'timePeriod'
- CONDITION_UNIQUE = 'uniqueValues'
- OPERATOR_BEGINSWITH = 'beginsWith'
- OPERATOR_BETWEEN = 'between'
- OPERATOR_CONTAINSTEXT = 'containsText'
- OPERATOR_ENDSWITH = 'endsWith'
- OPERATOR_EQUAL = 'equal'
- OPERATOR_GREATERTHAN = 'greaterThan'
- OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual'
- OPERATOR_LESSTHAN = 'lessThan'
- OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual'
- OPERATOR_NONE = ''
- OPERATOR_NOTBETWEEN = 'notBetween'
- OPERATOR_NOTCONTAINS = 'notContains'
- OPERATOR_NOTEQUAL = 'notEqual'
- TIMEPERIOD_LAST_7_DAYS = 'last7Days'
- TIMEPERIOD_LAST_MONTH = 'lastMonth'
- TIMEPERIOD_LAST_WEEK = 'lastWeek'
- TIMEPERIOD_NEXT_MONTH = 'nextMonth'
- TIMEPERIOD_NEXT_WEEK = 'nextWeek'
- TIMEPERIOD_THIS_MONTH = 'thisMonth'
- TIMEPERIOD_THIS_WEEK = 'thisWeek'
- TIMEPERIOD_TODAY = 'today'
- TIMEPERIOD_TOMORROW = 'tomorrow'
- TIMEPERIOD_YESTERDAY = 'yesterday'
- CONDITION_TYPES = [self::CONDITION_BEGINSWITH, self::CONDITION_CELLIS, self::CONDITION_COLORSCALE, self::CONDITION_CONTAINSBLANKS, self::CONDITION_CONTAINSERRORS, self::CONDITION_CONTAINSTEXT, self::CONDITION_DATABAR, self::CONDITION_DUPLICATES, self::CONDITION_ENDSWITH, self::CONDITION_EXPRESSION, self::CONDITION_NONE, self::CONDITION_NOTCONTAINSBLANKS, self::CONDITION_NOTCONTAINSERRORS, self::CONDITION_NOTCONTAINSTEXT, self::CONDITION_TIMEPERIOD, self::CONDITION_UNIQUE]
Properties
- $colorScale : ConditionalColorScale|null
- $condition : array<string|int, bool|float|int|string>
- Condition.
- $conditionType : string
- Condition type.
- $dataBar : ConditionalDataBar|null
- $noFormatSet : bool
- $operatorType : string
- Operator type.
- $stopIfTrue : bool
- Stop on this condition, if it matches.
- $style : Style
- $text : string
- Text.
Methods
- __clone() : mixed
- Implement PHP __clone to create a deep clone, not just a shallow copy.
- __construct() : mixed
- Create a new Conditional.
- addCondition() : $this
- Add Condition.
- getColorScale() : ConditionalColorScale|null
- getConditions() : array<string|int, bool|float|int|string>
- Get Conditions.
- getConditionType() : string
- Get Condition type.
- getDataBar() : ConditionalDataBar|null
- getHashCode() : string
- Get hash code.
- getNoFormatSet() : bool
- getOperatorType() : string
- Get Operator type.
- getStopIfTrue() : bool
- Get StopIfTrue.
- getStyle() : Style
- Get Style.
- getText() : string
- Get text.
- isValidConditionType() : bool
- Verify if param is valid condition type.
- setColorScale() : static
- setConditions() : $this
- Set Conditions.
- setConditionType() : $this
- Set Condition type.
- setDataBar() : static
- setNoFormatSet() : self
- setOperatorType() : $this
- Set Operator type.
- setStopIfTrue() : $this
- Set StopIfTrue.
- setStyle() : $this
- Set Style.
- setText() : $this
- Set text.
Constants
CONDITION_BEGINSWITH
public
mixed
CONDITION_BEGINSWITH
= 'beginsWith'
CONDITION_CELLIS
public
mixed
CONDITION_CELLIS
= 'cellIs'
CONDITION_COLORSCALE
public
mixed
CONDITION_COLORSCALE
= 'colorScale'
CONDITION_CONTAINSBLANKS
public
mixed
CONDITION_CONTAINSBLANKS
= 'containsBlanks'
CONDITION_CONTAINSERRORS
public
mixed
CONDITION_CONTAINSERRORS
= 'containsErrors'
CONDITION_CONTAINSTEXT
public
mixed
CONDITION_CONTAINSTEXT
= 'containsText'
CONDITION_DATABAR
public
mixed
CONDITION_DATABAR
= 'dataBar'
CONDITION_DUPLICATES
public
mixed
CONDITION_DUPLICATES
= 'duplicateValues'
CONDITION_ENDSWITH
public
mixed
CONDITION_ENDSWITH
= 'endsWith'
CONDITION_EXPRESSION
public
mixed
CONDITION_EXPRESSION
= 'expression'
CONDITION_NONE
public
mixed
CONDITION_NONE
= 'none'
CONDITION_NOTCONTAINSBLANKS
public
mixed
CONDITION_NOTCONTAINSBLANKS
= 'notContainsBlanks'
CONDITION_NOTCONTAINSERRORS
public
mixed
CONDITION_NOTCONTAINSERRORS
= 'notContainsErrors'
CONDITION_NOTCONTAINSTEXT
public
mixed
CONDITION_NOTCONTAINSTEXT
= 'notContainsText'
CONDITION_TIMEPERIOD
public
mixed
CONDITION_TIMEPERIOD
= 'timePeriod'
CONDITION_UNIQUE
public
mixed
CONDITION_UNIQUE
= 'uniqueValues'
OPERATOR_BEGINSWITH
public
mixed
OPERATOR_BEGINSWITH
= 'beginsWith'
OPERATOR_BETWEEN
public
mixed
OPERATOR_BETWEEN
= 'between'
OPERATOR_CONTAINSTEXT
public
mixed
OPERATOR_CONTAINSTEXT
= 'containsText'
OPERATOR_ENDSWITH
public
mixed
OPERATOR_ENDSWITH
= 'endsWith'
OPERATOR_EQUAL
public
mixed
OPERATOR_EQUAL
= 'equal'
OPERATOR_GREATERTHAN
public
mixed
OPERATOR_GREATERTHAN
= 'greaterThan'
OPERATOR_GREATERTHANOREQUAL
public
mixed
OPERATOR_GREATERTHANOREQUAL
= 'greaterThanOrEqual'
OPERATOR_LESSTHAN
public
mixed
OPERATOR_LESSTHAN
= 'lessThan'
OPERATOR_LESSTHANOREQUAL
public
mixed
OPERATOR_LESSTHANOREQUAL
= 'lessThanOrEqual'
OPERATOR_NONE
public
mixed
OPERATOR_NONE
= ''
OPERATOR_NOTBETWEEN
public
mixed
OPERATOR_NOTBETWEEN
= 'notBetween'
OPERATOR_NOTCONTAINS
public
mixed
OPERATOR_NOTCONTAINS
= 'notContains'
OPERATOR_NOTEQUAL
public
mixed
OPERATOR_NOTEQUAL
= 'notEqual'
TIMEPERIOD_LAST_7_DAYS
public
mixed
TIMEPERIOD_LAST_7_DAYS
= 'last7Days'
TIMEPERIOD_LAST_MONTH
public
mixed
TIMEPERIOD_LAST_MONTH
= 'lastMonth'
TIMEPERIOD_LAST_WEEK
public
mixed
TIMEPERIOD_LAST_WEEK
= 'lastWeek'
TIMEPERIOD_NEXT_MONTH
public
mixed
TIMEPERIOD_NEXT_MONTH
= 'nextMonth'
TIMEPERIOD_NEXT_WEEK
public
mixed
TIMEPERIOD_NEXT_WEEK
= 'nextWeek'
TIMEPERIOD_THIS_MONTH
public
mixed
TIMEPERIOD_THIS_MONTH
= 'thisMonth'
TIMEPERIOD_THIS_WEEK
public
mixed
TIMEPERIOD_THIS_WEEK
= 'thisWeek'
TIMEPERIOD_TODAY
public
mixed
TIMEPERIOD_TODAY
= 'today'
TIMEPERIOD_TOMORROW
public
mixed
TIMEPERIOD_TOMORROW
= 'tomorrow'
TIMEPERIOD_YESTERDAY
public
mixed
TIMEPERIOD_YESTERDAY
= 'yesterday'
CONDITION_TYPES
private
mixed
CONDITION_TYPES
= [self::CONDITION_BEGINSWITH, self::CONDITION_CELLIS, self::CONDITION_COLORSCALE, self::CONDITION_CONTAINSBLANKS, self::CONDITION_CONTAINSERRORS, self::CONDITION_CONTAINSTEXT, self::CONDITION_DATABAR, self::CONDITION_DUPLICATES, self::CONDITION_ENDSWITH, self::CONDITION_EXPRESSION, self::CONDITION_NONE, self::CONDITION_NOTCONTAINSBLANKS, self::CONDITION_NOTCONTAINSERRORS, self::CONDITION_NOTCONTAINSTEXT, self::CONDITION_TIMEPERIOD, self::CONDITION_UNIQUE]
Properties
$colorScale
private
ConditionalColorScale|null
$colorScale
= null
$condition
Condition.
private
array<string|int, bool|float|int|string>
$condition
= []
$conditionType
Condition type.
private
string
$conditionType
= self::CONDITION_NONE
$dataBar
private
ConditionalDataBar|null
$dataBar
= null
$noFormatSet
private
bool
$noFormatSet
= false
$operatorType
Operator type.
private
string
$operatorType
= self::OPERATOR_NONE
$stopIfTrue
Stop on this condition, if it matches.
private
bool
$stopIfTrue
= false
$style
private
Style
$style
$text
Text.
private
string
$text
= ''
Methods
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone() : mixed
__construct()
Create a new Conditional.
public
__construct() : mixed
addCondition()
Add Condition.
public
addCondition(bool|float|int|string $condition) : $this
Parameters
- $condition : bool|float|int|string
-
Condition
Return values
$thisgetColorScale()
public
getColorScale() : ConditionalColorScale|null
Return values
ConditionalColorScale|nullgetConditions()
Get Conditions.
public
getConditions() : array<string|int, bool|float|int|string>
Return values
array<string|int, bool|float|int|string>getConditionType()
Get Condition type.
public
getConditionType() : string
Return values
stringgetDataBar()
public
getDataBar() : ConditionalDataBar|null
Return values
ConditionalDataBar|nullgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getNoFormatSet()
public
getNoFormatSet() : bool
Return values
boolgetOperatorType()
Get Operator type.
public
getOperatorType() : string
Return values
stringgetStopIfTrue()
Get StopIfTrue.
public
getStopIfTrue() : bool
Return values
boolgetStyle()
Get Style.
public
getStyle() : Style
Return values
StylegetText()
Get text.
public
getText() : string
Return values
stringisValidConditionType()
Verify if param is valid condition type.
public
static isValidConditionType(string $type) : bool
Parameters
- $type : string
Return values
boolsetColorScale()
public
setColorScale(ConditionalColorScale $colorScale) : static
Parameters
- $colorScale : ConditionalColorScale
Return values
staticsetConditions()
Set Conditions.
public
setConditions(bool|array<string|int, bool|float|int|string>|float|int|string $conditions) : $this
Parameters
- $conditions : bool|array<string|int, bool|float|int|string>|float|int|string
-
Condition
Return values
$thissetConditionType()
Set Condition type.
public
setConditionType(string $type) : $this
Parameters
- $type : string
-
Condition type, see self::CONDITION_*
Return values
$thissetDataBar()
public
setDataBar(ConditionalDataBar $dataBar) : static
Parameters
- $dataBar : ConditionalDataBar
Return values
staticsetNoFormatSet()
public
setNoFormatSet(bool $noFormatSet) : self
Parameters
- $noFormatSet : bool
Return values
selfsetOperatorType()
Set Operator type.
public
setOperatorType(string $type) : $this
Parameters
- $type : string
-
Conditional operator type, see self::OPERATOR_*
Return values
$thissetStopIfTrue()
Set StopIfTrue.
public
setStopIfTrue(bool $stopIfTrue) : $this
Parameters
- $stopIfTrue : bool
Return values
$thissetStyle()
Set Style.
public
setStyle(Style $style) : $this
Parameters
- $style : Style
Return values
$thissetText()
Set text.
public
setText(string $text) : $this
Parameters
- $text : string