diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-12 11:59:45 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-16 12:44:11 +0100 |
commit | c1f266db886cb6ff87e81af1b47da7f5f70966f9 (patch) | |
tree | 51b14b41804309a0959d0d92bd61ed7f048680d7 /lib/private/previewmanager.php | |
parent | 227ff0a9e3a3106e58a352fe1fb1d5c7e01d3c28 (diff) | |
download | nextcloud-server-c1f266db886cb6ff87e81af1b47da7f5f70966f9.tar.gz nextcloud-server-c1f266db886cb6ff87e81af1b47da7f5f70966f9.zip |
Add an interface for the preview providers
Diffstat (limited to 'lib/private/previewmanager.php')
-rw-r--r-- | lib/private/previewmanager.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/previewmanager.php b/lib/private/previewmanager.php index fca1000c938..732681c78e7 100644 --- a/lib/private/previewmanager.php +++ b/lib/private/previewmanager.php @@ -8,8 +8,9 @@ */ namespace OC; -use OCP\image; +use OCP\Image; use OCP\IPreview; +use OCP\Preview\IProvider; class PreviewManager implements IPreview { /** @var array */ @@ -29,7 +30,7 @@ class PreviewManager implements IPreview { * In order to improve lazy loading a closure can be registered which will be * called in case preview providers are actually requested * - * $callable has to return an instance of \OC\Preview\Provider + * $callable has to return an instance of \OCP\Preview\IProvider * * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider * @param \Closure $callable @@ -119,11 +120,11 @@ class PreviewManager implements IPreview { if (preg_match($supportedMimeType, $file->getMimetype())) { foreach ($providers as $closure) { $provider = $closure(); - if (!($provider instanceof \OC\Preview\Provider)) { + if (!($provider instanceof IProvider)) { continue; } - /** @var $provider \OC\Preview\Provider */ + /** @var $provider IProvider */ if ($provider->isAvailable($file)) { return true; } |