Agenda toegevoegd (/agenda/overzicht/{week,maand,alles} en /agenda/details/:id)
This commit is contained in:
@@ -2,33 +2,8 @@
|
||||
|
||||
namespace Model;
|
||||
|
||||
class NewsSource {
|
||||
public $title;
|
||||
public $url;
|
||||
public $show;
|
||||
|
||||
public function __construct($title, $url, $show) {
|
||||
$this->title = $title;
|
||||
$this->url = $url;
|
||||
$this->show = $show;
|
||||
}
|
||||
}
|
||||
|
||||
class NewsImage extends Model {
|
||||
public $id;
|
||||
public $title;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
require "NewsImage.php";
|
||||
require "NewsSource.php";
|
||||
|
||||
class NewsItem extends Model {
|
||||
public $id;
|
||||
|
||||
Reference in New Issue
Block a user