File: /var/www/vhosts/creativefellows.nl/kjs.creativefellows.nl/src/KJS/AgendaItem.php
<?php
namespace KJS;
class AgendaItem
{
function __construct($data)
{
foreach($data as $key => $val)
{
$this->$key = is_numeric($val) ? intval($val) : $val;
}
}
public function title()
{
return $this->evenement;
}
public function description()
{
return $this->omschrijving;
}
public function intro()
{
return $this->intro;
}
public function link()
{
return $this->url;
}
public function date($pattern)
{
return ucfirst(strftime($pattern ,strtotime( $this->datum)));
}
public function time()
{
return $this->tijd;
}
public function location()
{
return $this->locatie;
}
public function uid()
{
return $this->unique_id;
}
public function logo($class=null){
return $this->logo ? '<img src="'. $this->logo .'" class="'. $class .'">' : null;
}
}
?>