mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
FileTextExtractor->isAvailable()
This commit is contained in:
parent
977c4e49c9
commit
f3fcf60c0f
@ -6,6 +6,11 @@
|
||||
*
|
||||
*/
|
||||
class HTMLTextExtractor extends FileTextExtractor {
|
||||
|
||||
function isAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function supportedExtensions() {
|
||||
return array("html", "htm", "xhtml");
|
||||
}
|
||||
|
@ -6,6 +6,12 @@
|
||||
*
|
||||
*/
|
||||
class PDFTextExtractor extends FileTextExtractor {
|
||||
|
||||
function isAvailable() {
|
||||
$bin = $this->bin('pdftotext');
|
||||
return (file_exists($bin) && is_executable($bin));
|
||||
}
|
||||
|
||||
function supportedExtensions() {
|
||||
return array("pdf");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user