1 <?php 2 3 namespace Box\Spout\Reader\XLSX\Manager\SharedStringsCaching; 4 5 /** 6 * Interface CachingStrategyInterface 7 */ 8 interface CachingStrategyInterface 9 { 10 /** 11 * Adds the given string to the cache. 12 * 13 * @param string $sharedString The string to be added to the cache 14 * @param int $sharedStringIndex Index of the shared string in the sharedStrings.xml file 15 * @return void 16 */ 17 public function addStringForIndex($sharedString, $sharedStringIndex); 18 19 /** 20 * Closes the cache after the last shared string was added. 21 * This prevents any additional string from being added to the cache. 22 * 23 * @return void 24 */ 25 public function closeCache(); 26 27 /** 28 * Returns the string located at the given index from the cache. 29 * 30 * @param int $sharedStringIndex Index of the shared string in the sharedStrings.xml file 31 * @throws \Box\Spout\Reader\Exception\SharedStringNotFoundException If no shared string found for the given index 32 * @return string The shared string at the given index 33 */ 34 public function getStringAtIndex($sharedStringIndex); 35 36 /** 37 * Destroys the cache, freeing memory and removing any created artifacts 38 * 39 * @return void 40 */ 41 public function clearCache(); 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body