mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
Merge pull request #46 from creative-commoners/pulls/3.0/remove-deps
Remove unused symfony dependencies and FileTextExtractor::get_mime
This commit is contained in:
commit
b20738573f
@ -23,9 +23,7 @@
|
||||
"silverstripe/framework": "^4",
|
||||
"silverstripe/assets": "^1",
|
||||
"silverstripe/versioned": "^1",
|
||||
"guzzlehttp/guzzle": "~6.3.0",
|
||||
"symfony/event-dispatcher": "^2.6.0@stable",
|
||||
"symfony/http-foundation": "^2.6.0"
|
||||
"guzzlehttp/guzzle": "~6.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3",
|
||||
|
@ -73,19 +73,6 @@ abstract class FileTextExtractor
|
||||
return Injector::inst()->get($class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to detect mime type for given file
|
||||
*
|
||||
* @param string $path
|
||||
* @return string Mime type if found
|
||||
*/
|
||||
protected static function get_mime($path)
|
||||
{
|
||||
$file = new \Symfony\Component\HttpFoundation\File\File($path);
|
||||
|
||||
return $file->getMimeType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a File object, decide which extractor instance to use to handle it
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user