1 | <?php |
||
8 | class PDFTextExtractor extends FileTextExtractor |
||
|
|||
9 | { |
||
10 | /** |
||
11 | * Set to bin path this extractor can execute |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | private static $binary_location = null; |
||
16 | |||
17 | /** |
||
18 | * Used if binary_location isn't set. |
||
19 | * List of locations to search for a given binary in |
||
20 | * |
||
21 | * @config |
||
22 | * @var array |
||
23 | */ |
||
24 | private static $search_binary_locations = array( |
||
25 | '/usr/bin', |
||
26 | '/usr/local/bin', |
||
27 | ); |
||
28 | |||
29 | public function isAvailable() |
||
34 | |||
35 | public function supportsExtension($extension) |
||
39 | |||
40 | public function supportsMime($mime) |
||
52 | |||
53 | /** |
||
54 | * Accessor to get the location of the binary |
||
55 | * |
||
56 | * @param string $program Name of binary |
||
57 | * @return string |
||
58 | */ |
||
59 | protected function bin($program = '') |
||
82 | |||
83 | public function getContent($path) |
||
91 | |||
92 | /** |
||
93 | * Invoke pdftotext with the given path |
||
94 | * |
||
95 | * @param string $path |
||
96 | * @return string Output |
||
97 | * @throws FileTextExtractor_Exception |
||
98 | */ |
||
99 | protected function getRawOutput($path) |
||
118 | |||
119 | /** |
||
120 | * Removes utf-8 ligatures. |
||
121 | * |
||
122 | * @link http://en.wikipedia.org/wiki/Typographic_ligature#Computer_typesetting |
||
123 | * |
||
124 | * @param string $input |
||
125 | * @return string |
||
126 | */ |
||
127 | protected function cleanupLigatures($input) |
||
140 | } |
||
141 |
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.