summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/provider.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/preview/provider.php')
-rw-r--r--lib/private/preview/provider.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php
index ead67eaeef7..1d6fac13965 100644
--- a/lib/private/preview/provider.php
+++ b/lib/private/preview/provider.php
@@ -1,10 +1,17 @@
<?php
namespace OC\Preview;
-abstract class Provider {
+use OCP\Preview\IProvider;
+
+abstract class Provider implements IProvider {
private $options;
- public function __construct($options) {
+ /**
+ * Constructor
+ *
+ * @param array $options
+ */
+ public function __construct(array $options = []) {
$this->options = $options;
}
@@ -16,10 +23,10 @@ abstract class Provider {
/**
* Check if a preview can be generated for $path
*
- * @param \OC\Files\FileInfo $file
+ * @param \OCP\Files\FileInfo $file
* @return bool
*/
- public function isAvailable($file) {
+ public function isAvailable(\OCP\Files\FileInfo $file) {
return true;
}
@@ -30,9 +37,7 @@ abstract class Provider {
* @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
* @param bool $scalingup Disable/Enable upscaling of previews
* @param \OC\Files\View $fileview fileview object of user folder
- * @return mixed
- * false if no preview was generated
- * OC_Image object of the preview
+ * @return bool|\OCP\IImage false if no preview was generated
*/
abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview);
}