extractSharedStrings() public method

All the strings are stored in a XML file, located at 'xl/sharedStrings.xml'. It is then accessed by the sheet data, via the string index in the built table. More documentation available here: http://msdn.microsoft.com/en-us/library/office/gg278314.aspx The XML file can be really big with sheets containing a lot of data. That is why we need to use a XML reader that provides streaming like the XMLReader library. Please note that SimpleXML does not provide such a functionality but since it is faster and more handy to parse few XML nodes, it is used in combination with XMLReader for that purpose.
public extractSharedStrings ( ) : void
return void
 /**
  * @return void
  */
 public function testGetStringAtIndexWithFileBasedStrategy()
 {
     // force the file-based strategy by setting no memory limit
     $originalMemoryLimit = ini_get('memory_limit');
     ini_set('memory_limit', '-1');
     $resourcePath = $this->getResourcePath('sheet_with_lots_of_shared_strings.xlsx');
     $sharedStringsHelper = new SharedStringsHelper($resourcePath);
     $sharedStringsHelper->extractSharedStrings();
     $sharedString = $sharedStringsHelper->getStringAtIndex(0);
     $this->assertEquals('str', $sharedString);
     $sharedString = $sharedStringsHelper->getStringAtIndex(CachingStrategyFactory::MAX_NUM_STRINGS_PER_TEMP_FILE + 1);
     $this->assertEquals('str', $sharedString);
     $usedCachingStrategy = \ReflectionHelper::getValueOnObject($sharedStringsHelper, 'cachingStrategy');
     $this->assertTrue($usedCachingStrategy instanceof FileBasedStrategy);
     $sharedStringsHelper->cleanup();
     ini_set('memory_limit', $originalMemoryLimit);
 }