Property | Type | Description | |
---|---|---|---|
$cachingStrategy | The best caching strategy for storing shared strings | ||
$filePath | Path of the XLSX file being read | ||
$tempFolder | Temporary folder where the temporary files to store shared strings will be stored |
Method | Description | |
---|---|---|
__construct ( string $filePath, string | null | void $tempFolder = null ) | ||
cleanup ( ) : void | Destroys the cache, freeing memory and removing any created artifacts | |
extractSharedStrings ( ) : void | Builds an in-memory array containing all the shared strings of the sheet. | |
getStringAtIndex ( integer $sharedStringIndex ) : string | Returns the shared string at the given index, using the previously chosen caching strategy. | |
hasSharedStrings ( ) : boolean | Returns whether the XLSX file contains a shared strings XML file |
Method | Description | |
---|---|---|
extractTextValueForNodes ( array $textNodes ) : string | ||
getBestSharedStringsCachingStrategy ( integer | null $sharedStringsUniqueCount ) : Box\Spout\Reader\XLSX\Helper\SharedStringsCaching\CachingStrategyInterface | Returns the best shared strings caching strategy. | |
getSharedStringsFilePath ( ) : string | ||
getSharedStringsUniqueCount ( Box\Spout\Reader\Wrapper\XMLReader $xmlReader ) : integer | null |
Returns the shared strings unique count, as specified in |
|
getSimpleXmlElementNodeFromXMLReader ( Box\Spout\Reader\Wrapper\XMLReader $xmlReader ) : |
Returns a SimpleXMLElement node from the current node in the given XMLReader instance. | |
processSharedStringsItem ( Box\Spout\Reader\Wrapper\XMLReader $xmlReader, integer $sharedStringIndex, Box\Spout\Common\Escaper\XLSX $escaper ) : void | Processes the shared strings item XML node which the given XML reader is positioned on. | |
removeSuperfluousTextNodes ( |
Removes nodes that should not be read, like the pronunciation of the Kanji characters. | |
shouldPreserveWhitespace ( |
If the text node has the attribute 'xml:space="preserve"', then preserve whitespace. |
protected extractTextValueForNodes ( array $textNodes ) : string | ||
$textNodes | array | Text XML nodes (" |
return | string | The value associated with the given text node(s) |
protected getSimpleXmlElementNodeFromXMLReader ( Box\Spout\Reader\Wrapper\XMLReader $xmlReader ) : |
||
$xmlReader | Box\Spout\Reader\Wrapper\XMLReader | |
return |
public getStringAtIndex ( integer $sharedStringIndex ) : string | ||
$sharedStringIndex | integer | Index of the shared string in the sharedStrings.xml file |
return | string | The shared string at the given index |
protected removeSuperfluousTextNodes ( |
||
$parentNode | Parent node that may contain nodes to remove | |
return | Cleaned parent node |
protected shouldPreserveWhitespace ( |
||
$textNode | The text node element ( |
|
return | boolean | Whether whitespace should be preserved |
protected $cachingStrategy |