diff options
Diffstat (limited to 'lib/public/ipreview.php')
-rw-r--r-- | lib/public/ipreview.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/public/ipreview.php b/lib/public/ipreview.php index cc756ef80d3..9ebe2e2d1cf 100644 --- a/lib/public/ipreview.php +++ b/lib/public/ipreview.php @@ -36,8 +36,18 @@ namespace OCP; /** * This class provides functions to render and show thumbnails and previews of files */ -interface IPreview -{ +interface 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 + * + * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider + * @param \Closure $callable + * @return void + */ + public function registerProvider($mimeTypeRegex, \Closure $callable); /** * Return a preview of a file |