1 | <?php |
||
19 | class Image implements ImageInterface |
||
20 | { |
||
21 | use TimestampableTrait; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $id; |
||
27 | |||
28 | /** |
||
29 | * Uploaded file extension. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $fileExtension; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $assetId; |
||
39 | |||
40 | /** |
||
41 | * @var ArticleMediaInterface |
||
42 | */ |
||
43 | protected $media; |
||
44 | |||
45 | /** |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $width; |
||
49 | |||
50 | /** |
||
51 | * @var int |
||
52 | */ |
||
53 | protected $height; |
||
54 | |||
55 | /** |
||
56 | * @var ImageRenditionInterface |
||
57 | */ |
||
58 | protected $rendition; |
||
59 | |||
60 | /** |
||
61 | * File constructor. |
||
62 | */ |
||
63 | public function __construct() |
||
67 | |||
68 | /** |
||
69 | * @return ArticleMediaInterface |
||
70 | */ |
||
71 | public function getMedia(): ArticleMediaInterface |
||
75 | |||
76 | /** |
||
77 | * @param ArticleMediaInterface $media |
||
78 | */ |
||
79 | public function setMedia(ArticleMediaInterface $media) |
||
83 | |||
84 | /** |
||
85 | * @param string $id |
||
86 | */ |
||
87 | public function setId($id) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getId() |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function setFileExtension($extension) |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getFileExtension() |
||
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | */ |
||
119 | public function getAssetId(): string |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function setAssetId(string $assetId) |
||
131 | |||
132 | /** |
||
133 | * @return ImageRenditionInterface |
||
134 | */ |
||
135 | public function getRendition() |
||
139 | |||
140 | /** |
||
141 | * @param ImageRenditionInterface $rendition |
||
142 | */ |
||
143 | public function setRendition(ImageRenditionInterface $rendition) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | public function getWidth() |
||
155 | |||
156 | /** |
||
157 | * Set the value of Width. |
||
158 | * |
||
159 | * @param int $width |
||
160 | * |
||
161 | * @return self |
||
162 | */ |
||
163 | public function setWidth($width) |
||
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | public function getHeight() |
||
177 | |||
178 | /** |
||
179 | * Set the value of Height. |
||
180 | * |
||
181 | * @param int $height |
||
182 | * |
||
183 | * @return self |
||
184 | */ |
||
185 | public function setHeight($height) |
||
191 | } |
||
192 |