You are here

private function PHPExcel_Calculation::_showValue in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php \PHPExcel_Calculation::_showValue()

* Format details of an operand for display in the log (based on operand type) * *

Parameters

mixed $value First matrix operand: * @return mixed

3 calls to PHPExcel_Calculation::_showValue()
PHPExcel_Calculation::_executeBinaryComparisonOperation in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
PHPExcel_Calculation::_processTokenStack in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
PHPExcel_Calculation::_showTypeDetails in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
* Format type and details of an operand for display in the log (based on operand type) * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php, line 2586

Class

PHPExcel_Calculation
PHPExcel_Calculation (Multiton)

Code

private function _showValue($value) {
  if ($this->_debugLog
    ->getWriteDebugLog()) {
    $testArray = PHPExcel_Calculation_Functions::flattenArray($value);
    if (count($testArray) == 1) {
      $value = array_pop($testArray);
    }
    if (is_array($value)) {
      $returnMatrix = array();
      $pad = $rpad = ', ';
      foreach ($value as $row) {
        if (is_array($row)) {
          $returnMatrix[] = implode($pad, array_map(array(
            $this,
            '_showValue',
          ), $row));
          $rpad = '; ';
        }
        else {
          $returnMatrix[] = $this
            ->_showValue($row);
        }
      }
      return '{ ' . implode($rpad, $returnMatrix) . ' }';
    }
    elseif (is_string($value) && trim($value, '"') == $value) {
      return '"' . $value . '"';
    }
    elseif (is_bool($value)) {
      return $value ? self::$_localeBoolean['TRUE'] : self::$_localeBoolean['FALSE'];
    }
  }
  return PHPExcel_Calculation_Functions::flattenSingleValue($value);
}