|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Mostafaznv\Larupload\DTOs; |
|
4
|
|
|
|
|
5
|
|
|
use Mostafaznv\Larupload\DTOs\Style\ImageStyle; |
|
6
|
|
|
use Mostafaznv\Larupload\Enums\LaruploadFileType; |
|
7
|
|
|
use Mostafaznv\Larupload\Enums\LaruploadImageLibrary; |
|
8
|
|
|
use Mostafaznv\Larupload\Enums\LaruploadNamingMethod; |
|
9
|
|
|
|
|
10
|
|
|
class CoverActionData |
|
11
|
|
|
{ |
|
12
|
|
|
public function __construct( |
|
13
|
|
|
public readonly string $disk, |
|
14
|
|
|
public readonly LaruploadNamingMethod $namingMethod, |
|
15
|
|
|
public readonly ?string $lang, |
|
16
|
|
|
public readonly ImageStyle $style, |
|
17
|
|
|
public readonly ?LaruploadFileType $type, |
|
18
|
|
|
public readonly bool $generateCover, |
|
19
|
|
|
public readonly bool $withDominantColor, |
|
20
|
|
|
public readonly int $dominantColorQuality, |
|
21
|
|
|
public readonly LaruploadImageLibrary $imageProcessingLibrary, |
|
22
|
|
|
public array $output |
|
23
|
|
|
) {} |
|
24
|
|
|
|
|
25
|
|
|
public static function make(string $disk, LaruploadNamingMethod $namingMethod, string $lang, ImageStyle $style, ?LaruploadFileType $type, bool $generateCover, bool $withDominantColor, int $dominantColorQuality, LaruploadImageLibrary $imageProcessingLibrary, array $output): static |
|
26
|
|
|
{ |
|
27
|
|
|
return new static($disk, $namingMethod, $lang, $style, $type, $generateCover, $withDominantColor, $dominantColorQuality, $imageProcessingLibrary, $output); |
|
28
|
|
|
} |
|
29
|
|
|
} |
|
30
|
|
|
|