start); parent::ConvertToDateTime($this->ends); $isLayout = $this->isLayout(); } private static $IDENTS = ['UURSLUITER' => 'Nieuws', 'NIEUWSOPEN ' => 'Nieuws', 'ANWB' => 'Verkeersinformatie', 'REGIO' => 'Regionieuws', 'CB' => 'Reclame']; public function isLayout() { foreach(self::$IDENTS as $ident => $display) { if(substr($this->itemCode, 0, strlen($ident)) == $ident || substr($this->title, 0, strlen($ident)) == $ident) { $this->title = $display; $this->artist = ""; $this->itemCode = '_' . $this->itemCode; return false; } } if(strlen($this->itemCode) > 0 && ($this->itemCode[0] == 'V')) { return true; } return false; } public function ends($ends = null) { $this->ends = $ends; } public function secondsRemaining() { return ($this->ends) ? ($this->ends->getTimestamp() - time()) : -1; } }