Model classes van API repo naar deze repo verplaatst

This commit is contained in:
NH Gooi committed 2024-09-29 19:05:03 +02:00
1 parent 8d1e79f1b7
commit 9698f9b103
17 files changed
+674 -29

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
<?php
namespace Model;
class NewsImage extends Model {
public $id;
public $title;
public $author;
public $url;
public function __construct($data, $urlPrefix = '/') {
parent::__construct($data);
// Deserialisatie van JSON heeft url in data,
// lezen uit database heeft file en (als het goed is) urlPrefix
if(isset($data->file)) {
$this->url = $urlPrefix . $data->file;
}
}
}