1 | <?php |
||
12 | class Styler |
||
13 | { |
||
14 | /** |
||
15 | * @var Style[] |
||
16 | */ |
||
17 | private $styles = array(); |
||
18 | |||
19 | /** |
||
20 | * @var Font[] |
||
21 | */ |
||
22 | private $fonts = array(); |
||
23 | |||
24 | /** |
||
25 | * @var Fill[] |
||
26 | */ |
||
27 | private $fills = array(); |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $hashes = array(); |
||
33 | |||
34 | /** |
||
35 | * Styler constructor. |
||
36 | */ |
||
37 | 3 | public function __construct() |
|
43 | |||
44 | /** |
||
45 | * Add a new style, if it doesnt exists yet. |
||
46 | * |
||
47 | * @param Style $style |
||
48 | */ |
||
49 | 3 | public function addStyle(Style $style) |
|
58 | |||
59 | /** |
||
60 | * Register a new Style compoment its compoments to account |
||
61 | * for reusable styles, fills, fonts, ... |
||
62 | * |
||
63 | * @param Component $component |
||
64 | * @param array $collection |
||
65 | */ |
||
66 | 3 | private function register(Component $component, &$collection) |
|
78 | |||
79 | /** |
||
80 | * @return Style |
||
81 | */ |
||
82 | 1 | public function getDefaultStyle() |
|
86 | |||
87 | /** |
||
88 | * Return entire xml string for the style sheet. |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | 2 | public function getStyleSheetXml() |
|
113 | } |
||
114 |