ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Calculation\Logical Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Calculation\Logical:

Static Public Member Functions

static true ()
 TRUE. More...
 
static false ()
 FALSE. More...
 
static logicalAnd (... $args)
 LOGICAL_AND. More...
 
static logicalOr (... $args)
 LOGICAL_OR. More...
 
static logicalXor (... $args)
 LOGICAL_XOR. More...
 
static NOT ($logical=false)
 NOT. More...
 
static statementIf ($condition=true, $returnIfTrue=0, $returnIfFalse=false)
 STATEMENT_IF. More...
 
static statementSwitch (... $arguments)
 STATEMENT_SWITCH. More...
 
static IFERROR ($testValue='', $errorpart='')
 IFERROR. More...
 
static IFNA ($testValue='', $napart='')
 IFNA. More...
 
static IFS (... $arguments)
 IFS. More...
 

Detailed Description

Deprecated:
1.17.0

Definition at line 10 of file Logical.php.

Member Function Documentation

◆ false()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::false ( )
static

FALSE.

Returns the boolean FALSE.

Excel Function: =FALSE()

1.17.0

See also
Logical::FALSE() Use the FALSE() method in the Logical class instead
Returns
bool False

Definition at line 47 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean\false().

47  : bool
48  {
49  return Boolean::false();
50  }
+ Here is the call graph for this function:

◆ IFERROR()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::IFERROR (   $testValue = '',
  $errorpart = '' 
)
static

IFERROR.

Excel Function: =IFERROR(testValue,errorpart)

1.17.0

See also
Logical::IFERROR() Use the IFERROR() method in the Logical class instead
Parameters
mixed$testValueValue to check, is also the value returned when no error
mixed$errorpartValue to return when testValue is an error condition
Returns
mixed The value of errorpart or testValue determined by error condition

Definition at line 264 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional\IFERROR().

265  {
266  return Logical\Conditional::IFERROR($testValue, $errorpart);
267  }
static IFERROR($testValue='', $errorpart='')
IFERROR.
+ Here is the call graph for this function:

◆ IFNA()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::IFNA (   $testValue = '',
  $napart = '' 
)
static

IFNA.

Excel Function: =IFNA(testValue,napart)

1.17.0

See also
Logical::IFNA() Use the IFNA() method in the Logical class instead
Parameters
mixed$testValueValue to check, is also the value returned when not an NA
mixed$napartValue to return when testValue is an NA condition
Returns
mixed The value of errorpart or testValue determined by error condition

Definition at line 285 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional\IFNA().

286  {
287  return Logical\Conditional::IFNA($testValue, $napart);
288  }
static IFNA($testValue='', $napart='')
IFNA.
+ Here is the call graph for this function:

◆ IFS()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::IFS (   $arguments)
static

IFS.

Excel Function: =IFS(testValue1;returnIfTrue1;testValue2;returnIfTrue2;...;testValue_n;returnIfTrue_n)

testValue1 ... testValue_n Conditions to Evaluate returnIfTrue1 ... returnIfTrue_n Value returned if corresponding testValue (nth) was true

1.17.0

See also
Logical::IFS() Use the IFS() method in the Logical class instead
Parameters
mixed...$arguments Statement arguments
Returns
mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true

Definition at line 310 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional\IFS().

311  {
312  return Logical\Conditional::IFS(...$arguments);
313  }
+ Here is the call graph for this function:

◆ logicalAnd()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd (   $args)
static

LOGICAL_AND.

Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.

Excel Function: =AND(logical1[,logical2[, ...]])

The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical values.

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

1.17.0

See also
Logical::logicalAnd() Use the logicalAnd() method in the Logical class instead
Parameters
mixed...$args Data values
Returns
bool|string the logical AND of the arguments

Definition at line 77 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations\logicalAnd().

78  {
79  return Logical\Operations::logicalAnd(...$args);
80  }
+ Here is the call graph for this function:

◆ logicalOr()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalOr (   $args)
static

LOGICAL_OR.

Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

Excel Function: =OR(logical1[,logical2[, ...]])

The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical values.

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

1.17.0

See also
Logical::logicalOr() Use the logicalOr() method in the Logical class instead
Parameters
mixed$argsData values
Returns
bool|string the logical OR of the arguments

Definition at line 107 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations\logicalOr().

108  {
109  return Logical\Operations::logicalOr(...$args);
110  }
+ Here is the call graph for this function:

◆ logicalXor()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalXor (   $args)
static

LOGICAL_XOR.

Returns the Exclusive Or logical operation for one or more supplied conditions. i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE, and FALSE otherwise.

Excel Function: =XOR(logical1[,logical2[, ...]])

The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical values.

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

1.17.0

See also
Logical::logicalXor() Use the logicalXor() method in the Logical class instead
Parameters
mixed$argsData values
Returns
bool|string the logical XOR of the arguments

Definition at line 139 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations\logicalXor().

140  {
141  return Logical\Operations::logicalXor(...$args);
142  }
+ Here is the call graph for this function:

◆ NOT()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::NOT (   $logical = false)
static

NOT.

Returns the boolean inverse of the argument.

Excel Function: =NOT(logical)

The argument must evaluate to a logical value such as TRUE or FALSE

Boolean arguments are treated as True or False as appropriate Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value

1.17.0

See also
Logical::NOT() Use the NOT() method in the Logical class instead
Parameters
mixed$logicalA value or expression that can be evaluated to TRUE or FALSE
Returns
bool|string the boolean inverse of the argument

Definition at line 168 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Operations\NOT().

169  {
170  return Logical\Operations::NOT($logical);
171  }
+ Here is the call graph for this function:

◆ statementIf()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::statementIf (   $condition = true,
  $returnIfTrue = 0,
  $returnIfFalse = false 
)
static

STATEMENT_IF.

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

Excel Function: =IF(condition[,returnIfTrue[,returnIfFalse]])

Condition is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use any comparison calculation operator. ReturnIfTrue is the value that is returned if condition evaluates to TRUE. For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE, then the IF function returns the text "Within budget" If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use the logical value TRUE for this argument. ReturnIfTrue can be another formula. ReturnIfFalse is the value that is returned if condition evaluates to FALSE. For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE, then the IF function returns the text "Over budget". If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned. If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. ReturnIfFalse can be another formula.

1.17.0

See also
Logical::statementIf() Use the statementIf() method in the Logical class instead
Parameters
mixed$conditionCondition to evaluate
mixed$returnIfTrueValue to return when condition is true
mixed$returnIfFalseOptional value to return when condition is false
Returns
mixed The value of returnIfTrue or returnIfFalse determined by condition

Definition at line 209 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional\statementIf().

210  {
211  return Logical\Conditional::statementIf($condition, $returnIfTrue, $returnIfFalse);
212  }
static statementIf($condition=true, $returnIfTrue=0, $returnIfFalse=false)
STATEMENT_IF.
Definition: Conditional.php:41
+ Here is the call graph for this function:

◆ statementSwitch()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::statementSwitch (   $arguments)
static

STATEMENT_SWITCH.

Returns corresponding with first match (any data type such as a string, numeric, date, etc).

Excel Function: =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default])

Expression The expression to compare to a list of values. value1, value2, ... value_n A list of values that are compared to expression. The SWITCH function is looking for the first value that matches the expression. result1, result2, ... result_n A list of results. The SWITCH function returns the corresponding result when a value matches expression. default Optional. It is the default to return if expression does not match any of the values (value1, value2, ... value_n).

1.17.0

See also
Logical::statementSwitch() Use the statementSwitch() method in the Logical class instead
Parameters
mixed$argumentsStatement arguments
Returns
mixed The value of matched expression

Definition at line 243 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Conditional\statementSwitch().

244  {
245  return Logical\Conditional::statementSwitch(...$arguments);
246  }
static statementSwitch(... $arguments)
STATEMENT_SWITCH.
Definition: Conditional.php:78
+ Here is the call graph for this function:

◆ true()

static PhpOffice\PhpSpreadsheet\Calculation\Logical::true ( )
static

TRUE.

Returns the boolean TRUE.

Excel Function: =TRUE()

1.17.0

See also
Logical::TRUE() Use the TRUE() method in the Logical class instead
Returns
bool True

Definition at line 27 of file Logical.php.

References PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean\true().

27  : bool
28  {
29  return Boolean::true();
30  }
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: