|
19 | 19 | */ |
20 | 20 | class ExtractedImage |
21 | 21 | { |
22 | | - /** |
23 | | - * @var Imagick Wrapper for the image. |
24 | | - */ |
25 | | - public Imagick $image; |
26 | | - |
27 | | - /** |
28 | | - * @var string Name of the file. |
29 | | - */ |
30 | | - public string $filename; |
31 | | - |
32 | | - /** |
33 | | - * @var integer Page ID of the image. |
34 | | - */ |
35 | | - public int $pageId; |
36 | | - |
37 | | - /** |
38 | | - * @var integer Element ID of the image. |
39 | | - */ |
40 | | - public int $elementId; |
41 | | - |
42 | | - /** |
43 | | - * @var string String representation of the save format. |
44 | | - */ |
45 | | - protected string $saveFormat; |
46 | | - |
47 | 22 | /** |
48 | 23 | * Initializes a new instance of the ExtractedImage class. |
49 | 24 | * |
50 | 25 | * @param Imagick $image The extracted image. |
51 | 26 | * @param string $filename The filename for the image. |
52 | 27 | * @param string $saveFormat The format to save the image. |
53 | | - * @param integer $pageIndex The page index of the image. |
54 | | - * @param integer $index The element index of the image. |
| 28 | + * @param integer $pageId The page index of the image. |
| 29 | + * @param integer $elementId The element index of the image. |
55 | 30 | * |
56 | 31 | * @throws MindeeUnhandledException Throws if PDF operations aren't supported. |
57 | 32 | */ |
58 | | - public function __construct(Imagick $image, string $filename, string $saveFormat, int $pageIndex, int $index) |
| 33 | + public function __construct(public Imagick $image, public string $filename, protected string $saveFormat, public int $pageId, public int $elementId) |
59 | 34 | { |
60 | 35 | DependencyChecker::isImageMagickAvailable(); |
61 | 36 | DependencyChecker::isGhostscriptAvailable(); |
62 | | - $this->image = $image; |
63 | | - $this->filename = $filename; |
64 | | - $this->saveFormat = $saveFormat; |
65 | | - $this->pageId = $pageIndex; |
66 | | - $this->elementId = $index; |
67 | 37 | } |
68 | 38 |
|
69 | 39 | /** |
|
0 commit comments