Browse Source
Add PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/4620/head
Morris Jobke
9 years ago
committed by
Robin Appelman
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
3 changed files with
6 additions and
2 deletions
-
lib/private/Preview/Generator.php
-
lib/private/PreviewManager.php
-
lib/public/IPreview.php
|
|
|
@ -84,6 +84,7 @@ class Generator { |
|
|
|
* @param string $mimeType |
|
|
|
* @return ISimpleFile |
|
|
|
* @throws NotFoundException |
|
|
|
* @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid) |
|
|
|
*/ |
|
|
|
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null) { |
|
|
|
$this->eventDispatcher->dispatch( |
|
|
|
@ -299,6 +300,7 @@ class Generator { |
|
|
|
* @param int $maxHeight |
|
|
|
* @return ISimpleFile |
|
|
|
* @throws NotFoundException |
|
|
|
* @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid) |
|
|
|
*/ |
|
|
|
private function generatePreview(ISimpleFolder $previewFolder, ISimpleFile $maxPreview, $width, $height, $crop, $maxWidth, $maxHeight) { |
|
|
|
$preview = $this->helper->getImage($maxPreview); |
|
|
|
|
|
|
|
@ -182,7 +182,8 @@ class PreviewManager implements IPreview { |
|
|
|
* @param string $mimeType |
|
|
|
* @return ISimpleFile |
|
|
|
* @throws NotFoundException |
|
|
|
* @since 11.0.0 |
|
|
|
* @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid) |
|
|
|
* @since 11.0.0 - \InvalidArgumentException was added in 12.0.0 |
|
|
|
*/ |
|
|
|
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null) { |
|
|
|
if ($this->generator === null) { |
|
|
|
|
|
|
|
@ -104,7 +104,8 @@ interface IPreview { |
|
|
|
* @param string $mimeType To force a given mimetype for the file (files_versions needs this) |
|
|
|
* @return ISimpleFile |
|
|
|
* @throws NotFoundException |
|
|
|
* @since 11.0.0 |
|
|
|
* @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid) |
|
|
|
* @since 11.0.0 - \InvalidArgumentException was added in 12.0.0 |
|
|
|
*/ |
|
|
|
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null); |
|
|
|
|
|
|
|
|