CellMatcher
Table of Contents
Constants
-
COMPARISON_DUPLICATES_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_DUPLICATES => "COUNTIF('%s'!%s,%s)>1", \PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_UNIQUE => "COUNTIF('%s'!%s,%s)=1"]
-
COMPARISON_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_EQUAL => '=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHAN => '>', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHANOREQUAL => '>=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHAN => '<', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHANOREQUAL => '<=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_NOTEQUAL => '<>']
-
COMPARISON_RANGE_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_BETWEEN => 'IF(AND(A1>=%s,A1<=%s),TRUE,FALSE)', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_NOTBETWEEN => 'IF(AND(A1>=%s,A1<=%s),FALSE,TRUE)']
Properties
-
$cell
: Cell
-
$cellColumn
: int
-
$cellRow
: int
-
$conditionalRange
: string
-
$engine
: Calculation
-
$referenceCell
: string
-
$referenceColumn
: int
-
$referenceRow
: int
-
$worksheet
: Worksheet
Methods
-
__construct()
: mixed
-
evaluateConditional()
: bool
-
adjustConditionsForCellReferences()
: array<string|int, mixed>
-
cellConditionCheck()
: string
-
conditionCellAdjustment()
: float|int|string
-
evaluateExpression()
: bool
-
processDuplicatesComparison()
: bool
-
processExpression()
: bool
-
processOperatorComparison()
: bool
-
processRangeOperator()
: bool
-
setReferenceCellForExpressions()
: void
-
wrapCellValue()
: float|int|string
-
wrapValue()
: float|int|string
COMPARISON_DUPLICATES_OPERATORS
public
mixed
COMPARISON_DUPLICATES_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_DUPLICATES => "COUNTIF('%s'!%s,%s)>1", \PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_UNIQUE => "COUNTIF('%s'!%s,%s)=1"]
COMPARISON_OPERATORS
public
mixed
COMPARISON_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_EQUAL => '=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHAN => '>', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHANOREQUAL => '>=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHAN => '<', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHANOREQUAL => '<=', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_NOTEQUAL => '<>']
COMPARISON_RANGE_OPERATORS
public
mixed
COMPARISON_RANGE_OPERATORS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_BETWEEN => 'IF(AND(A1>=%s,A1<=%s),TRUE,FALSE)', \PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_NOTBETWEEN => 'IF(AND(A1>=%s,A1<=%s),FALSE,TRUE)']
$cell
protected
Cell
$cell
$cellColumn
protected
int
$cellColumn
$cellRow
protected
int
$cellRow
$conditionalRange
protected
string
$conditionalRange
$engine
protected
Calculation
$engine
$referenceCell
protected
string
$referenceCell
$referenceColumn
protected
int
$referenceColumn
$referenceRow
protected
int
$referenceRow
$worksheet
protected
Worksheet
$worksheet
__construct()
public
__construct(Cell $cell, string $conditionalRange) : mixed
Parameters
-
$cell
: Cell
-
-
$conditionalRange
: string
-
evaluateConditional()
public
evaluateConditional(Conditional $conditional) : bool
Parameters
-
$conditional
: Conditional
-
adjustConditionsForCellReferences()
protected
adjustConditionsForCellReferences(array<string|int, mixed> $conditions) : array<string|int, mixed>
Parameters
-
$conditions
: array<string|int, mixed>
-
Return values
array<string|int, mixed>
cellConditionCheck()
protected
cellConditionCheck(string $condition) : string
Parameters
-
$condition
: string
-
conditionCellAdjustment()
protected
conditionCellAdjustment(array<string|int, mixed> $matches) : float|int|string
Parameters
-
$matches
: array<string|int, mixed>
-
Return values
float|int|string
evaluateExpression()
protected
evaluateExpression(string $expression) : bool
Parameters
-
$expression
: string
-
processDuplicatesComparison()
protected
processDuplicatesComparison(Conditional $conditional) : bool
Parameters
-
$conditional
: Conditional
-
processExpression()
protected
processExpression(Conditional $conditional) : bool
Parameters
-
$conditional
: Conditional
-
processOperatorComparison()
protected
processOperatorComparison(Conditional $conditional) : bool
Parameters
-
$conditional
: Conditional
-
processRangeOperator()
protected
processRangeOperator(Conditional $conditional) : bool
Parameters
-
$conditional
: Conditional
-
setReferenceCellForExpressions()
protected
setReferenceCellForExpressions(string $conditionalRange) : void
Parameters
-
$conditionalRange
: string
-
wrapCellValue()
protected
wrapCellValue() : float|int|string
Return values
float|int|string
wrapValue()
protected
wrapValue(mixed $value) : float|int|string
Parameters
-
$value
: mixed
-
Return values
float|int|string