summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/provider.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-27 19:40:23 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-27 19:40:23 +0100
commitfca9d32545c933d3a262c1d49b44a805589de882 (patch)
treef64b2ec86b8c259bc2543771b7bd68d2c9254097 /lib/private/preview/provider.php
parent05a069c1010b1f76ab1d5ce4bd0395e1ee3405c0 (diff)
downloadnextcloud-server-fca9d32545c933d3a262c1d49b44a805589de882.tar.gz
nextcloud-server-fca9d32545c933d3a262c1d49b44a805589de882.zip
Move registration of core preview providers to preview
So the class files only have class code and don't execute code
Diffstat (limited to 'lib/private/preview/provider.php')
-rw-r--r--lib/private/preview/provider.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php
index f544c2c4b13..10e23efa20a 100644
--- a/lib/private/preview/provider.php
+++ b/lib/private/preview/provider.php
@@ -5,18 +5,21 @@ abstract class Provider {
private $options;
public function __construct($options) {
- $this->options=$options;
+ $this->options = $options;
}
+ /**
+ * @return string Regex with the mimetypes that are supported by this provider
+ */
abstract public function getMimeType();
/**
* Check if a preview can be generated for $path
*
- * @param string $path
+ * @param \OC\Files\FileInfo $file
* @return bool
*/
- public function isAvailable($path) {
+ public function isAvailable($file) {
return true;
}
@@ -32,5 +35,4 @@ abstract class Provider {
* OC_Image object of the preview
*/
abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview);
-
}