ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
NumberFormat.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Reader\Xml\Style
;
4
5
use
SimpleXMLElement
;
6
7
class
NumberFormat
extends
StyleBase
8
{
9
public
function
parseStyle
(
SimpleXMLElement
$styleAttributes): array
10
{
11
$style
= [];
12
13
$fromFormats = [
'\-'
,
'\ '
];
14
$toFormats = [
'-'
,
' '
];
15
16
foreach
($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
17
$styleAttributeValue = str_replace($fromFormats, $toFormats, $styleAttributeValue);
18
19
switch
($styleAttributeValue) {
20
case
'Short Date'
:
21
$styleAttributeValue =
'dd/mm/yyyy'
;
22
23
break
;
24
}
25
26
if
($styleAttributeValue >
''
) {
27
$style
[
'numberFormat'
][
'formatCode'
] = $styleAttributeValue;
28
}
29
}
30
31
return
$style
;
32
}
33
}
SimpleXMLElement
$style
$style
Definition:
example_012.php:70
PhpOffice\PhpSpreadsheet\Reader\Xml\Style\NumberFormat\parseStyle
parseStyle(SimpleXMLElement $styleAttributes)
Definition:
NumberFormat.php:9
PhpOffice\PhpSpreadsheet\Reader\Xml\Style
Definition:
Alignment.php:3
PhpOffice\PhpSpreadsheet\Reader\Xml\Style\StyleBase
Definition:
StyleBase.php:7
php
PhpOffice\PhpSpreadsheet\Reader\Xml\Style\NumberFormat
Definition:
NumberFormat.php:7
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Reader
Xml
Style
NumberFormat.php
Generated on Thu Jan 30 2025 19:01:24 for ILIAS by
1.8.13 (using
Doxyfile
)