1 | <?php |
||
8 | class HTMLTextExtractor extends FileTextExtractor |
||
|
|||
9 | { |
||
10 | public function isAvailable() |
||
14 | |||
15 | public function supportsExtension($extension) |
||
22 | |||
23 | public function supportsMime($mime) |
||
27 | |||
28 | /** |
||
29 | * Lower priority because its not the most clever HTML extraction. If there is something better, use it |
||
30 | * |
||
31 | * @config |
||
32 | * @var integer |
||
33 | */ |
||
34 | private static $priority = 10; |
||
35 | |||
36 | /** |
||
37 | * Extracts content from regex, by using strip_tags() |
||
38 | * combined with regular expressions to remove non-content tags like <style> or <script>, |
||
39 | * as well as adding line breaks after block tags. |
||
40 | * |
||
41 | * @param string $path |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getContent($path) |
||
77 | } |
||
78 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.