Files
nhgooi.nl/srv/api/common/classes/NewsImage.php
2025-07-15 15:45:09 +02:00

21 lines
446 B
PHP
Executable File

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