Provider¶
-
class
OC\Preview\
Provider
¶ Source: lib/private/Preview/Provider.php#32 Implements: OCP\Preview\IProvider
Properties¶
Methods¶
-
public
OC\Preview\Provider::
__construct
($options=[])¶ - Constructor
Source: Parameters: - $options (array)
-
public abstract
OC\Preview\Provider::
getMimeType
()¶ Source: lib/private/Preview/Provider.php#47 Returns: string Regex with the mimetypes that are supported by this provider
-
public
OC\Preview\Provider::
isAvailable
($file)¶ - Check if a preview can be generated for $path
Source: Parameters: - $file (
OCP\Files\FileInfo
)
Returns: bool
- $file (
-
public abstract
OC\Preview\Provider::
getThumbnail
($path, $maxX, $maxY, $scalingup, $fileview)¶ - Generates thumbnail which fits in $maxX and $maxY and keeps the aspect ratio, for file at path $path
Source: Parameters: - $path (string) Path of file
- $maxX (int) The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
- $maxY (int) The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
- $scalingup (bool) Disable/Enable upscaling of previews
- $fileview (
OC\Files\View
) fileview object of user folder
Returns: bool |
\OCP\IImage
false if no preview was generated