diff options
Diffstat (limited to '')
| -rw-r--r-- | model/Conference.php | 4 | ||||
| -rw-r--r-- | model/Upcoming.php | 19 | 
2 files changed, 23 insertions, 0 deletions
diff --git a/model/Conference.php b/model/Conference.php index e9e33a6..a4c14aa 100644 --- a/model/Conference.php +++ b/model/Conference.php @@ -6,6 +6,10 @@ class Conference extends ModelBase  		return $this->get('CONFERENCE.TITLE', 'C3Voc Streaming');  	} +	public function isClosed() { +		return $this->get('CONFERENCE.CLOSED'); +	} +  	public function hasAuthor() {  		return $this->has('CONFERENCE.AUTHOR');  	} diff --git a/model/Upcoming.php b/model/Upcoming.php new file mode 100644 index 0000000..6f54814 --- /dev/null +++ b/model/Upcoming.php @@ -0,0 +1,19 @@ +<?php + +class Upcoming +{ +	public function getNextEvent() +	{ +		try { +			$events = file_get_contents('https://c3voc.de/eventkalender/events.json?filter=upcoming'); +			$events = json_decode($events, true); +			$names = array_keys($events['voc_events']); + +			return $events['voc_events'][$names[0]]; +		} +		catch(ErrorException $e) +		{ +			return null; +		} +	} +}  | 
