Box\Spout\Reader\XLSX\Helper\StyleHelper::extractRelevantInfo PHP Method

extractRelevantInfo() protected method

Reads the styles.xml file and extract the relevant information from the file.
protected extractRelevantInfo ( ) : void
return void
    protected function extractRelevantInfo()
    {
        $this->customNumberFormats = [];
        $this->stylesAttributes = [];
        $xmlReader = new XMLReader();
        if ($xmlReader->openFileInZip($this->filePath, self::STYLES_XML_FILE_PATH)) {
            while ($xmlReader->read()) {
                if ($xmlReader->isPositionedOnStartingNode(self::XML_NODE_NUM_FMTS)) {
                    $this->extractNumberFormats($xmlReader);
                } else {
                    if ($xmlReader->isPositionedOnStartingNode(self::XML_NODE_CELL_XFS)) {
                        $this->extractStyleAttributes($xmlReader);
                    }
                }
            }
            $xmlReader->close();
        }
    }