image_data = $a["image_data"] ?? ($a["image_url"] ?? ""); $this->image_type = $a["image_type"] ?? "none"; } function setImageData(string $image_data): void { $this->image_data = $image_data; } function getImageData(): string { return $this->image_data; } function setImageType(string $image_type): void { $this->image_type = $image_type; } function getImageType(): string { return $this->image_type; } function toArray(string $mode = "all"): array { $a = parent::toArray($mode); $a["image_data"] = $this->image_data; $a["image_type"] = $this->image_type; return $a; } }