| 1 | <?php |
||
| 15 | class Media implements \JsonSerializable |
||
| 16 | { |
||
| 17 | private const IMAGE_PATH = 'image'; |
||
| 18 | |||
| 19 | private const POSITION = 'pos'; |
||
| 20 | |||
| 21 | private const TYPE = 'typ'; |
||
| 22 | |||
| 23 | // TODO MEDIA -> VID, LAB? image_path & id are only fields in integration boilerplate |
||
| 24 | private const VID = 'vid'; |
||
| 25 | |||
| 26 | private const LAB = 'lab'; |
||
| 27 | |||
| 28 | private const ID = 'id'; |
||
| 29 | |||
| 30 | /** @var string */ |
||
| 31 | private $imagePath; |
||
| 32 | |||
| 33 | /** @var int */ |
||
| 34 | private $position; |
||
| 35 | |||
| 36 | /** @var string */ |
||
| 37 | private $type; |
||
| 38 | |||
| 39 | /** @var mixed|null */ |
||
| 40 | private $vid = false; |
||
| 41 | |||
| 42 | /** @var string */ |
||
| 43 | private $lab = ''; |
||
| 44 | |||
| 45 | /** @var int */ |
||
| 46 | private $id; |
||
| 47 | |||
| 48 | public function __construct(string $imagePath, int $position, ?string $type, int $id) |
||
| 55 | |||
| 56 | public function jsonSerialize(): array |
||
| 67 | } |
||
| 68 |