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