1 | <?php |
||
6 | class TikaRestClient extends Client |
||
|
|||
7 | { |
||
8 | /** |
||
9 | * Authentication options to be sent to the Tika server |
||
10 | * |
||
11 | * @var array |
||
12 | */ |
||
13 | protected $options = array('username' => null, 'password' => null); |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $mimes = array(); |
||
19 | |||
20 | public function __construct($baseUrl = '', $config = null) |
||
30 | |||
31 | /** |
||
32 | * Detect if the service is available |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | public function isAvailable() |
||
50 | |||
51 | /** |
||
52 | * Get version code |
||
53 | * |
||
54 | * @return float |
||
55 | */ |
||
56 | public function getVersion() |
||
70 | |||
71 | /** |
||
72 | * Gets supported mime data. May include aliased mime types. |
||
73 | * |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getSupportedMimes() |
||
89 | |||
90 | /** |
||
91 | * Extract text content from a given file. |
||
92 | * Logs a notice-level error if the document can't be parsed. |
||
93 | * |
||
94 | * @param string $file Full filesystem path to a file to post |
||
95 | * @return string Content of the file extracted as plain text |
||
96 | */ |
||
97 | public function tika($file) |
||
125 | } |
||
126 |
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.