ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Calculation_Logical Class Reference
+ Collaboration diagram for PHPExcel_Calculation_Logical:

Static Public Member Functions

static TRUE ()
static FALSE ()
static LOGICAL_AND ()
static LOGICAL_OR ()
static NOT ($logical)
static STATEMENT_IF ($condition=true, $returnIfTrue=0, $returnIfFalse=False)
static IFERROR ($testValue= '', $errorpart= '')

Detailed Description

Definition at line 46 of file Logical.php.

Member Function Documentation

static PHPExcel_Calculation_Logical::FALSE ( )
static

Definition at line 77 of file Logical.php.

{
return false;
} // function FALSE()
static PHPExcel_Calculation_Logical::IFERROR (   $testValue = '',
  $errorpart = '' 
)
static

Definition at line 283 of file Logical.php.

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation_Functions\IS_ERROR(), and STATEMENT_IF().

{
$testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);
$errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);
return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);
} // function IFERROR()

+ Here is the call graph for this function:

static PHPExcel_Calculation_Logical::LOGICAL_AND ( )
static

Definition at line 103 of file Logical.php.

References $arg, PHPExcel_Calculation_Functions\flattenArray(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

{
// Return value
$returnValue = True;
// Loop through the arguments
$argCount = 0;
foreach ($aArgs as $arg) {
// Is it a boolean value?
if (is_bool($arg)) {
$returnValue = $returnValue && $arg;
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
$returnValue = $returnValue && ($arg != 0);
} elseif (is_string($arg)) {
$arg = strtoupper($arg);
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
$arg = true;
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
$arg = false;
} else {
}
$returnValue = $returnValue && ($arg != 0);
}
++$argCount;
}
// Return
if ($argCount == 0) {
}
return $returnValue;
} // function LOGICAL_AND()

+ Here is the call graph for this function:

static PHPExcel_Calculation_Logical::LOGICAL_OR ( )
static

Definition at line 159 of file Logical.php.

References $arg, PHPExcel_Calculation_Functions\flattenArray(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

{
// Return value
$returnValue = False;
// Loop through the arguments
$argCount = 0;
foreach ($aArgs as $arg) {
// Is it a boolean value?
if (is_bool($arg)) {
$returnValue = $returnValue || $arg;
} elseif ((is_numeric($arg)) && (!is_string($arg))) {
$returnValue = $returnValue || ($arg != 0);
} elseif (is_string($arg)) {
$arg = strtoupper($arg);
if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {
$arg = true;
} elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {
$arg = false;
} else {
}
$returnValue = $returnValue || ($arg != 0);
}
++$argCount;
}
// Return
if ($argCount == 0) {
}
return $returnValue;
} // function LOGICAL_OR()

+ Here is the call graph for this function:

static PHPExcel_Calculation_Logical::NOT (   $logical)
static

Definition at line 214 of file Logical.php.

References PHPExcel_Calculation_Functions\flattenSingleValue(), PHPExcel_Calculation\getFALSE(), PHPExcel_Calculation\getTRUE(), and PHPExcel_Calculation_Functions\VALUE().

{
if (is_string($logical)) {
$logical = strtoupper($logical);
if (($logical == 'TRUE') || ($logical == PHPExcel_Calculation::getTRUE())) {
return false;
} elseif (($logical == 'FALSE') || ($logical == PHPExcel_Calculation::getFALSE())) {
return true;
} else {
}
}
return !$logical;
} // function NOT()

+ Here is the call graph for this function:

static PHPExcel_Calculation_Logical::STATEMENT_IF (   $condition = true,
  $returnIfTrue = 0,
  $returnIfFalse = False 
)
static

Definition at line 262 of file Logical.php.

References PHPExcel_Calculation_Functions\flattenSingleValue().

Referenced by IFERROR().

{
$condition = (is_null($condition)) ? True : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition);
$returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);
$returnIfFalse = (is_null($returnIfFalse)) ? False : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);
return ($condition ? $returnIfTrue : $returnIfFalse);
} // function STATEMENT_IF()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static PHPExcel_Calculation_Logical::TRUE ( )
static

Definition at line 60 of file Logical.php.

{
return true;
} // function TRUE()

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