1 | <?php |
||
8 | class TikaServerTextExtractor extends FileTextExtractor |
||
|
|||
9 | { |
||
10 | /** |
||
11 | * Tika server is pretty efficient so use it immediately if available |
||
12 | * |
||
13 | * @var integer |
||
14 | * @config |
||
15 | */ |
||
16 | private static $priority = 80; |
||
17 | |||
18 | /** |
||
19 | * Server endpoint |
||
20 | * |
||
21 | * @var string |
||
22 | * @config |
||
23 | */ |
||
24 | private static $server_endpoint; |
||
25 | |||
26 | /** |
||
27 | * @var TikaRestClient |
||
28 | */ |
||
29 | protected $client = null; |
||
30 | |||
31 | /** |
||
32 | * @return TikaRestClient |
||
33 | */ |
||
34 | public function getClient() |
||
44 | |||
45 | public function getServerEndpoint() |
||
58 | |||
59 | /** |
||
60 | * Get the version of tika installed, or 0 if not installed |
||
61 | * |
||
62 | * @return float version of tika |
||
63 | */ |
||
64 | public function getVersion() |
||
70 | |||
71 | public function isAvailable() |
||
77 | |||
78 | public function supportsExtension($extension) |
||
83 | |||
84 | |||
85 | /** |
||
86 | * Cache of supported mime types |
||
87 | * |
||
88 | * @var array |
||
89 | */ |
||
90 | protected $supportedMimes = array(); |
||
91 | |||
92 | public function supportsMime($mime) |
||
111 | |||
112 | public function getContent($path) |
||
116 | } |
||
117 |
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.