You are here

private static function PHPExcel_Reader_Excel2007::_castToBool in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php \PHPExcel_Reader_Excel2007::_castToBool()
1 call to PHPExcel_Reader_Excel2007::_castToBool()
PHPExcel_Reader_Excel2007::load in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Loads PHPExcel from file * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php, line 244

Class

PHPExcel_Reader_Excel2007
PHPExcel_Reader_Excel2007

Code

private static function _castToBool($c) {

  //		echo 'Initial Cast to Boolean', PHP_EOL;
  $value = isset($c->v) ? (string) $c->v : NULL;
  if ($value == '0') {
    return FALSE;
  }
  elseif ($value == '1') {
    return TRUE;
  }
  else {
    return (bool) $c->v;
  }
  return $value;
}