Documentation

CellMatcher
in package

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

Constants

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)']

Properties

$conditionalRange

protected string $conditionalRange

Methods

__construct()

public __construct(Cell $cell, string $conditionalRange) : mixed
Parameters
$cell : Cell
$conditionalRange : string

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
Return values
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
Return values
bool

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

        
On this page

Search results