Akeneo\Component\SpreadsheetParser\Xlsx\SharedStringsLoader::open PHP Method

open() public method

Creates a SharedStrings from the archive
public open ( string $path, Akeneo\Component\SpreadsheetParser\Xlsx\Archive $archive ) : SharedStrings
$path string
$archive Akeneo\Component\SpreadsheetParser\Xlsx\Archive The Archive from which the path was extracted
return SharedStrings
    public function open($path, Archive $archive)
    {
        return new $this->sharedStringsClass($path, $archive);
    }

Usage Example

 /**
  * @return SharedStrings
  */
 protected function getSharedStrings()
 {
     if (!$this->sharedStrings) {
         $path = $this->archive->extract($this->relationships->getSharedStringsPath());
         $this->sharedStrings = $this->sharedStringsLoader->open($path);
     }
     return $this->sharedStrings;
 }
SharedStringsLoader