1 | <?php |
||
22 | class Main |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * An array of HTML Purifier instances keyed by filter configuration hash |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $htmlpurifiers = array(); |
||
30 | |||
31 | /** |
||
32 | * Config class instance |
||
33 | * @var \gplcart\core\Config $config |
||
34 | */ |
||
35 | protected $config; |
||
36 | |||
37 | /** |
||
38 | * Library class instance |
||
39 | * @var \gplcart\core\Library $library |
||
40 | */ |
||
41 | protected $library; |
||
42 | |||
43 | /** |
||
44 | * @param Config $config |
||
45 | * @param Library $library |
||
46 | */ |
||
47 | public function __construct(Config $config, Library $library) |
||
52 | |||
53 | /** |
||
54 | * Implements hook "library.list" |
||
55 | * @param array $libraries |
||
56 | */ |
||
57 | public function hookLibraryList(array &$libraries) |
||
76 | |||
77 | /** |
||
78 | * Implements hook "route.list" |
||
79 | * @param array $routes |
||
80 | */ |
||
81 | public function hookRouteList(array &$routes) |
||
97 | |||
98 | /** |
||
99 | * Implements hook "user.role.permissions" |
||
100 | * @param array $permissions |
||
101 | */ |
||
102 | public function hookUserRolePermissions(array &$permissions) |
||
107 | |||
108 | /** |
||
109 | * Implements hook "filter" |
||
110 | * @param string $text |
||
111 | * @param array $filter |
||
112 | * @param null|string $filtered |
||
113 | */ |
||
114 | public function hookFilter($text, $filter, &$filtered) |
||
124 | |||
125 | /** |
||
126 | * Implements hook "filter.handlers" |
||
127 | * @param mixed $filters |
||
128 | */ |
||
129 | public function hookFilterHandlers(array &$filters) |
||
133 | |||
134 | /** |
||
135 | * Implements hook "module.enable.after" |
||
136 | */ |
||
137 | public function hookModuleEnableAfter() |
||
141 | |||
142 | /** |
||
143 | * Implements hook "module.disable.after" |
||
144 | */ |
||
145 | public function hookModuleDisableAfter() |
||
149 | |||
150 | /** |
||
151 | * Implements hook "module.install.after" |
||
152 | */ |
||
153 | public function hookModuleInstallAfter() |
||
157 | |||
158 | /** |
||
159 | * Implements hook "module.uninstall.after" |
||
160 | */ |
||
161 | public function hookModuleUninstallAfter() |
||
171 | |||
172 | /** |
||
173 | * Filter a string |
||
174 | * @param string $text |
||
175 | * @param array $filter |
||
176 | * @return string |
||
177 | */ |
||
178 | public function filter($text, $filter) |
||
182 | |||
183 | /** |
||
184 | * Returns HTML Purifier class instance depending on the filter configuration |
||
185 | * @param array $filter |
||
186 | * @return HTMLPurifier |
||
187 | * @throws LogicException |
||
188 | */ |
||
189 | public function getHtmlpurifierInstance(array $filter) |
||
212 | |||
213 | /** |
||
214 | * Returns an array of filter handlers |
||
215 | * @return array |
||
216 | */ |
||
217 | public function getHandlers() |
||
223 | |||
224 | } |
||
225 |