Files
nhgooi.nl/app/Models/Kerkdienst.php
T
root 30893eb7a7
Build and Deploy / build (push) Failing after 44s
Changes by CLaude
2026-08-18 09:31:05 -01:00

38 lines
813 B
PHP
Executable File

<?php
namespace Model;
class KerkdienstInstance extends Model {
public $name;
public $start;
public function __construct($data) {
// Convert arrays to objects for consistent handling
if(is_array($data)) {
$data = (object) $data;
}
parent::__construct($data);
// Ensure name is a string, not an array
if(is_array($this->name)) {
$this->name = $this->name[0] ?? '';
}
parent::ConvertToDateTime($this->start);
}
}
class Kerkdienst extends Model {
public $isRunning;
public $previous;
public $next;
public function __construct($data) {
// parent::__construct($data);
$this->isRunning = $data->isRunning;
$this->previous = new KerkdienstInstance($data->previous);
$this->next = new KerkdienstInstance($data->next);
}
}