PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / libraries / vendor / PhpSpreadsheet / Reader / Xml / Style / StyleBase.php

StyleBase.php in TablePress – Tables in WordPress made easy 3.4, at libraries/vendor/PhpSpreadsheet/Reader/Xml/Style/StyleBase.php

32 lines 791 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TablePress\PhpOffice\PhpSpreadsheet\Reader\Xml\Style;
4
5 use SimpleXMLElement;
6
7 abstract class StyleBase
8 {
9 /** @param string[] $styleList */
10 protected static function identifyFixedStyleValue(array $styleList, string &$styleAttributeValue): bool
11 {
12 $returnValue = false;
13
14 $styleAttributeValue = strtolower($styleAttributeValue);
15 foreach ($styleList as $style) {
16 if ($styleAttributeValue == strtolower($style)) {
17 $styleAttributeValue = $style;
18 $returnValue = true;
19
20 break;
21 }
22 }
23
24 return $returnValue;
25 }
26
27 protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement
28 {
29 return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));
30 }
31 }
32