Table of Contents
Interfaces
- WizardInterface
Constants
-
EXPRESSIONS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY => 'FLOOR(%s,1)=TODAY()-1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY => 'FLOOR(%s,1)=TODAY()', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW => 'FLOOR(%s,1)=TODAY()+1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS => 'AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(%s,0)<(WEEKDAY(TODAY())+7))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(%s,0)-TODAY()<=7-WEEKDAY(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK => 'AND(ROUNDDOWN(%s,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(%s,0)-TODAY()<(15-WEEKDAY(TODAY())))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0-1)),YEAR(%s)=YEAR(EDATE(TODAY(),0-1)))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH => 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))']
-
MAGIC_OPERATIONS
= ['yesterday' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY, 'today' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY, 'tomorrow' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW, 'lastSevenDays' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'last7Days' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'lastWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK, 'thisWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK, 'nextWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK, 'lastMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH, 'thisMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH, 'nextMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH]
Properties
-
$cellRange
: string
-
$expression
: string
-
$operator
: string
-
$referenceCell
: string
-
$referenceColumn
: int
-
$referenceRow
: int
-
$stopIfTrue
: bool
-
$style
: Style|null
Methods
-
__call()
: self
-
__construct()
: mixed
-
fromConditional()
: WizardInterface
-
getCellRange()
: string
-
getConditional()
: Conditional
-
getStopIfTrue()
: bool
-
getStyle()
: Style
-
lastMonth()
: DateValue
-
lastSevenDays()
: DateValue
-
lastWeek()
: DateValue
-
nextMonth()
: DateValue
-
nextWeek()
: DateValue
-
reverseAdjustCellRef()
: string
-
setCellRange()
: void
-
setStopIfTrue()
: void
-
setStyle()
: void
-
thisMonth()
: DateValue
-
thisWeek()
: DateValue
-
today()
: DateValue
-
tomorrow()
: DateValue
-
yesterday()
: DateValue
-
adjustConditionsForCellReferences()
: array<string|int, mixed>
-
cellConditionCheck()
: string
-
conditionCellAdjustment()
: string
-
operator()
: void
-
reverseCellAdjustment()
: string
-
setExpression()
: void
-
setReferenceCellForExpressions()
: void
-
validateOperand()
: string
EXPRESSIONS
protected
mixed
EXPRESSIONS
= [\PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY => 'FLOOR(%s,1)=TODAY()-1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY => 'FLOOR(%s,1)=TODAY()', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW => 'FLOOR(%s,1)=TODAY()+1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS => 'AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(%s,0)<(WEEKDAY(TODAY())+7))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(%s,0)-TODAY()<=7-WEEKDAY(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK => 'AND(ROUNDDOWN(%s,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(%s,0)-TODAY()<(15-WEEKDAY(TODAY())))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0-1)),YEAR(%s)=YEAR(EDATE(TODAY(),0-1)))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH => 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))']
MAGIC_OPERATIONS
protected
mixed
MAGIC_OPERATIONS
= ['yesterday' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY, 'today' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY, 'tomorrow' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW, 'lastSevenDays' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'last7Days' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'lastWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK, 'thisWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK, 'nextWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK, 'lastMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH, 'thisMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH, 'nextMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH]
$cellRange
protected
string
$cellRange
$expression
protected
string
$expression
$operator
protected
string
$operator
$referenceCell
protected
string
$referenceCell
$referenceColumn
protected
int
$referenceColumn
$referenceRow
protected
int
$referenceRow
$stopIfTrue
protected
bool
$stopIfTrue
= false
$style
protected
Style|null
$style
= null
__call()
public
__call(string $methodName, array<string|int, mixed> $arguments) : self
Parameters
-
$methodName
: string
-
-
$arguments
: array<string|int, mixed>
-
__construct()
public
__construct(string $cellRange) : mixed
Parameters
-
$cellRange
: string
-
fromConditional()
public
static fromConditional(Conditional $conditional[, string $cellRange = 'A1' ]) : WizardInterface
Parameters
-
$conditional
: Conditional
-
-
$cellRange
: string
= 'A1'
-
getCellRange()
public
getCellRange() : string
getConditional()
public
getConditional() : Conditional
getStopIfTrue()
public
getStopIfTrue() : bool
getStyle()
public
getStyle() : Style
lastMonth()
public
lastMonth() : DateValue
lastSevenDays()
public
lastSevenDays() : DateValue
lastWeek()
public
lastWeek() : DateValue
nextMonth()
public
nextMonth() : DateValue
nextWeek()
public
nextWeek() : DateValue
reverseAdjustCellRef()
public
static reverseAdjustCellRef(string $condition, string $cellRange) : string
Parameters
-
$condition
: string
-
-
$cellRange
: string
-
setCellRange()
public
setCellRange(string $cellRange) : void
Parameters
-
$cellRange
: string
-
setStopIfTrue()
public
setStopIfTrue(bool $stopIfTrue) : void
Parameters
-
$stopIfTrue
: bool
-
setStyle()
public
setStyle(Style $style) : void
Parameters
-
$style
: Style
-
thisMonth()
public
thisMonth() : DateValue
thisWeek()
public
thisWeek() : DateValue
today()
public
today() : DateValue
tomorrow()
public
tomorrow() : DateValue
yesterday()
public
yesterday() : DateValue
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) : string
Parameters
-
$matches
: array<string|int, mixed>
-
operator()
protected
operator(string $operator) : void
Parameters
-
$operator
: string
-
reverseCellAdjustment()
protected
static reverseCellAdjustment(array<string|int, mixed> $matches, int $referenceColumn, int $referenceRow) : string
Parameters
-
$matches
: array<string|int, mixed>
-
-
$referenceColumn
: int
-
-
$referenceRow
: int
-
setExpression()
protected
setExpression() : void
setReferenceCellForExpressions()
protected
setReferenceCellForExpressions(string $conditionalRange) : void
Parameters
-
$conditionalRange
: string
-
validateOperand()
protected
validateOperand(string $operand[, string $operandValueType = Wizard::VALUE_TYPE_LITERAL ]) : string
Parameters
-
$operand
: string
-
-
$operandValueType
: string
= Wizard::VALUE_TYPE_LITERAL
-