|
Ultima modificación |
Ver Log
|
Rev |
Autor |
Línea Nro. |
Línea |
1441 |
ariadna |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace PhpOffice\PhpSpreadsheet\Reader\Xml\Style;
|
|
|
4 |
|
|
|
5 |
use SimpleXMLElement;
|
|
|
6 |
|
|
|
7 |
abstract class StyleBase
|
|
|
8 |
{
|
|
|
9 |
protected static function identifyFixedStyleValue(array $styleList, string &$styleAttributeValue): bool
|
|
|
10 |
{
|
|
|
11 |
$returnValue = false;
|
|
|
12 |
|
|
|
13 |
$styleAttributeValue = strtolower($styleAttributeValue);
|
|
|
14 |
foreach ($styleList as $style) {
|
|
|
15 |
if ($styleAttributeValue == strtolower($style)) {
|
|
|
16 |
$styleAttributeValue = $style;
|
|
|
17 |
$returnValue = true;
|
|
|
18 |
|
|
|
19 |
break;
|
|
|
20 |
}
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
return $returnValue;
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement
|
|
|
27 |
{
|
|
|
28 |
return ($simple === null) ? new SimpleXMLElement('<xml></xml>') : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));
|
|
|
29 |
}
|
|
|
30 |
}
|