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) |
||
73 | |||
74 | /** |
||
75 | * Implements hook "route.list" |
||
76 | * @param array $routes |
||
77 | */ |
||
78 | public function hookRouteList(array &$routes) |
||
94 | |||
95 | /** |
||
96 | * Implements hook "user.role.permissions" |
||
97 | * @param array $permissions |
||
98 | */ |
||
99 | public function hookUserRolePermissions(array &$permissions) |
||
104 | |||
105 | /** |
||
106 | * Implements hook "filter" |
||
107 | * @param string $text |
||
108 | * @param array $filter |
||
109 | * @param null|string $filtered |
||
110 | */ |
||
111 | public function hookFilter($text, $filter, &$filtered) |
||
121 | |||
122 | /** |
||
123 | * Implements hook "filter.handlers" |
||
124 | * @param mixed $filters |
||
125 | */ |
||
126 | public function hookFilterHandlers(array &$filters) |
||
130 | |||
131 | /** |
||
132 | * Implements hook "module.uninstall.after" |
||
133 | */ |
||
134 | public function hookModuleUninstallAfter() |
||
142 | |||
143 | /** |
||
144 | * Filter a string |
||
145 | * @param string $text |
||
146 | * @param array $filter |
||
147 | * @return string |
||
148 | */ |
||
149 | public function filter($text, $filter) |
||
153 | |||
154 | /** |
||
155 | * Returns HTML Purifier class instance depending on the filter configuration |
||
156 | * @param array $filter |
||
157 | * @return HTMLPurifier |
||
158 | * @throws LogicException |
||
159 | */ |
||
160 | public function getPurifier(array $filter) |
||
183 | |||
184 | /** |
||
185 | * Returns an array of filter handlers |
||
186 | * @return array |
||
187 | */ |
||
188 | public function getHandlers() |
||
195 | |||
196 | } |
||
197 |