1 | <?php |
||
13 | class HintGenerator |
||
14 | { |
||
15 | /** |
||
16 | * @var array Config on which hints are based |
||
17 | */ |
||
18 | protected $config; |
||
19 | |||
20 | /** |
||
21 | * @var array Generated hints |
||
22 | */ |
||
23 | protected $hints; |
||
24 | |||
25 | /** |
||
26 | * @var PluginCollection Configured plugins |
||
27 | */ |
||
28 | protected $plugins; |
||
29 | |||
30 | /** |
||
31 | * @var string XSL stylesheet on which hints are based |
||
32 | */ |
||
33 | protected $xsl; |
||
34 | |||
35 | /** |
||
36 | * Generate a HINT object that contains informations about the configuration |
||
37 | * |
||
38 | * @return string JavaScript Code |
||
39 | */ |
||
40 | public function getHints() |
||
59 | |||
60 | /** |
||
61 | * Set the config on which hints are based |
||
62 | * |
||
63 | * @param array $config |
||
64 | * @return void |
||
65 | */ |
||
66 | public function setConfig(array $config) |
||
70 | |||
71 | /** |
||
72 | * Set the collection of plugins |
||
73 | * |
||
74 | * @param PluginCollection $plugins |
||
75 | * @return void |
||
76 | */ |
||
77 | public function setPlugins(PluginCollection $plugins) |
||
81 | |||
82 | /** |
||
83 | * Set the XSL on which hints are based |
||
84 | * |
||
85 | * @param string $xsl |
||
86 | * @return void |
||
87 | */ |
||
88 | public function setXSL($xsl) |
||
92 | |||
93 | /** |
||
94 | * Set custom hints from plugins |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | protected function setPluginsHints() |
||
105 | |||
106 | /** |
||
107 | * Set hints related to rendering |
||
108 | * |
||
109 | * @return void |
||
110 | */ |
||
111 | protected function setRenderingHints() |
||
117 | |||
118 | /** |
||
119 | * Set hints related to rules |
||
120 | * |
||
121 | * @return void |
||
122 | */ |
||
123 | protected function setRulesHints() |
||
154 | |||
155 | /** |
||
156 | * Set hints based on given tag's attributes config |
||
157 | * |
||
158 | * @param array $tagConfig |
||
159 | * @return void |
||
160 | */ |
||
161 | protected function setTagAttributesHints(array $tagConfig) |
||
174 | |||
175 | /** |
||
176 | * Set hints related to tags config |
||
177 | * |
||
178 | * @return void |
||
179 | */ |
||
180 | protected function setTagsHints() |
||
191 | } |