public function PHPExcel_Writer_Excel2007_StringTable::flipStringTable in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/StringTable.php \PHPExcel_Writer_Excel2007_StringTable::flipStringTable()
* Flip string table (for index searching) * *
Parameters
array $stringTable Stringtable: * @return array
1 call to PHPExcel_Writer_Excel2007_StringTable::flipStringTable()
- PHPExcel_Writer_Excel2007_StringTable::createStringTable in vendor/phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel2007/ StringTable.php 
- * Create worksheet stringtable * *
File
- vendor/phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel2007/ StringTable.php, line 303 
Class
- PHPExcel_Writer_Excel2007_StringTable
- PHPExcel_Writer_Excel2007_StringTable
Code
public function flipStringTable($stringTable = array()) {
  // Return value
  $returnValue = array();
  // Loop through stringtable and add flipped items to $returnValue
  foreach ($stringTable as $key => $value) {
    if (!$value instanceof PHPExcel_RichText) {
      $returnValue[$value] = $key;
    }
    else {
      if ($value instanceof PHPExcel_RichText) {
        $returnValue[$value
          ->getHashCode()] = $key;
      }
    }
  }
  // Return
  return $returnValue;
}