1 | <?php |
||
20 | class Image implements ImageInterface |
||
21 | { |
||
22 | use TimestampableTrait; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $id; |
||
28 | |||
29 | /** |
||
30 | * Uploaded file extension. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $fileExtension; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $assetId; |
||
40 | |||
41 | /** |
||
42 | * @var ArticleMediaInterface |
||
43 | */ |
||
44 | protected $media; |
||
45 | |||
46 | /** |
||
47 | * @var int |
||
48 | */ |
||
49 | protected $width; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | protected $height; |
||
55 | |||
56 | /** |
||
57 | * @var ArrayCollection |
||
58 | */ |
||
59 | protected $renditions; |
||
60 | |||
61 | /** |
||
62 | * File constructor. |
||
63 | */ |
||
64 | public function __construct() |
||
69 | |||
70 | /** |
||
71 | * @return ArticleMediaInterface |
||
72 | */ |
||
73 | public function getMedia(): ArticleMediaInterface |
||
77 | |||
78 | /** |
||
79 | * @param ArticleMediaInterface $media |
||
80 | */ |
||
81 | public function setMedia(ArticleMediaInterface $media) |
||
85 | |||
86 | /** |
||
87 | * @param string $id |
||
88 | */ |
||
89 | public function setId($id) |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function getId() |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function setFileExtension($extension) |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function getFileExtension() |
||
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | public function getAssetId(): string |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | public function setAssetId(string $assetId) |
||
133 | |||
134 | /** |
||
135 | * @return ArrayCollection |
||
136 | */ |
||
137 | public function getRenditions() |
||
141 | |||
142 | /** |
||
143 | * @param ImageRendition $rendition |
||
144 | */ |
||
145 | public function addRendition(ImageRendition $rendition) |
||
149 | |||
150 | /** |
||
151 | * @param ArrayCollection $renditions |
||
152 | */ |
||
153 | public function setRenditions($renditions) |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function getWidth() |
||
165 | |||
166 | /** |
||
167 | * Set the value of Width. |
||
168 | * |
||
169 | * @param int $width |
||
170 | * |
||
171 | * @return self |
||
172 | */ |
||
173 | public function setWidth($width) |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public function getHeight() |
||
187 | |||
188 | /** |
||
189 | * Set the value of Height. |
||
190 | * |
||
191 | * @param int $height |
||
192 | * |
||
193 | * @return self |
||
194 | */ |
||
195 | public function setHeight($height) |
||
201 | } |
||
202 |