Files
nhgooi.nl/srv/api/common/classes/NewsImage.php
Jorit Tijsen 55aa88c0f6 Test version
2024-03-05 17:22:55 +01:00

21 lines
446 B
PHP

<?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;
}
}
}