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

open() public method

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

Usage Example

 /**
  * @return Styles
  */
 protected function getStyles()
 {
     if (!$this->styles) {
         $path = $this->archive->extract($this->relationships->getStylesPath());
         $this->styles = $this->stylesLoader->open($path);
     }
     return $this->styles;
 }