1 | <?php |
||
18 | class StyleHelper |
||
19 | { |
||
20 | /** |
||
21 | * Increase style index with every built style. |
||
22 | * |
||
23 | * @var int |
||
24 | */ |
||
25 | private static $styleIndex = 1; |
||
26 | |||
27 | /** |
||
28 | * Concatenated <font> strings. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private static $fontXml = '<font><sz val="11"/><color rgb="000000"/><name val="Calibri"/></font><font><sz val="11"/><color rgb="000000"/><name val="Calibri"/></font>'; |
||
33 | |||
34 | /** |
||
35 | * Concatenated <fill> strings |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private static $fillXml = '<fill><patternFill patternType="none"/></fill><fill><patternFill patternType="grey125"/></fill>'; |
||
40 | |||
41 | /** |
||
42 | * Build a single new style based on given params and return it's id. |
||
43 | * Every newly built style will result in a completely new style set. |
||
44 | * |
||
45 | * @param Style $style |
||
46 | * @return string |
||
47 | */ |
||
48 | 2 | public static function buildStyle(Style $style) |
|
56 | |||
57 | /** |
||
58 | * Return entire <fills> part for style.xml. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | 1 | public static function getFillsXml() |
|
66 | |||
67 | /** |
||
68 | * Return entire <fonts> part for style.xml. |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | 1 | public static function getFontsXml() |
|
76 | |||
77 | /** |
||
78 | * Return entire cellXfs part for style.xml. |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | 1 | public static function getCellXfsXml() |
|
92 | } |
||
93 |