Event-getter classes
This commit is contained in:
parent
dc84fc0133
commit
28397845a0
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
namespace pvv\side;
|
||||||
|
|
||||||
|
Class Events {
|
||||||
|
public function getAllEvents(){
|
||||||
|
$events = array();
|
||||||
|
$ev = new OnceEvent("Test","Now","Never","sm0xe","Here");
|
||||||
|
$events[0] = $ev;
|
||||||
|
return $events;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
namespace pvv\side;
|
||||||
|
|
||||||
|
Class OnceEvent implements Event {
|
||||||
|
private $name, $start, $end, $org, $loc;
|
||||||
|
public function __construct($name,$start,$end,$org, $loc){
|
||||||
|
$this->name = $name;
|
||||||
|
$this->start = $start;
|
||||||
|
$this->end = $end;
|
||||||
|
$this->org = $org;
|
||||||
|
$this->log = $loc;
|
||||||
|
}
|
||||||
|
public function getStart(){
|
||||||
|
return $this->start;
|
||||||
|
}
|
||||||
|
public function getStop(){
|
||||||
|
return $this->end;
|
||||||
|
}
|
||||||
|
public function getOrganiser(){
|
||||||
|
return $this->org;
|
||||||
|
}
|
||||||
|
public function getLocation(){
|
||||||
|
return $this->loc;
|
||||||
|
}
|
||||||
|
public function getName(){
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -37,18 +37,33 @@
|
||||||
<h2>Kommende arrangement</h2>
|
<h2>Kommende arrangement</h2>
|
||||||
<ul class="calendar-events">
|
<ul class="calendar-events">
|
||||||
<?php
|
<?php
|
||||||
|
include "../../nettsiden/src/_autoload.php";
|
||||||
|
use \pvv\side\Events;
|
||||||
|
# TEST START
|
||||||
|
#Class Event {
|
||||||
|
# private $start, $name;
|
||||||
|
# function Event($name,$start){$this->start = $start;$this->name=$name;}
|
||||||
|
# function getName(){return $this->name;}
|
||||||
|
# function getStart(){return $this->start;}
|
||||||
|
#}
|
||||||
|
$evs = new Events();
|
||||||
|
$events = $evs->getAllEvents();
|
||||||
|
# TEST END
|
||||||
|
|
||||||
echo "<li><p>i dag<span>".date("Y-m-d")."</span></p>";
|
echo "<li><p>i dag<span>".date("Y-m-d")."</span></p>";
|
||||||
echo "<ul>";
|
echo "<ul>";
|
||||||
echo "<li>";
|
foreach($events as $ev){
|
||||||
echo "<a href=\"\">nerdepitsa</a>";
|
echo "<li>";
|
||||||
echo "<span>19.00</span>";
|
echo "<a href=\"\">".$ev->getName()."</a>";
|
||||||
echo " <a class=\"icon subscribe\" href=\"\">+</a>";
|
echo "<span>".$ev->getStart()."</span>";
|
||||||
echo " </li>";
|
echo " <a class=\"icon subscribe\" href=\"\">+</a>";
|
||||||
echo " <li>";
|
echo " </li>";
|
||||||
echo " <a href=\"\">animekveld</a>";
|
}
|
||||||
echo " <span>19.30</span>";
|
#echo " <li>";
|
||||||
echo " <a class=\"icon subscribe\" href=\"\">+</a>";
|
#echo " <a href=\"\">animekveld</a>";
|
||||||
echo " </li>";
|
#echo " <span>19.30</span>";
|
||||||
|
#echo " <a class=\"icon subscribe\" href=\"\">+</a>";
|
||||||
|
#echo " </li>";
|
||||||
echo "</ul>";
|
echo "</ul>";
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
echo "<li><p>noen gang<span>2016-08-XX</span></p>";
|
echo "<li><p>noen gang<span>2016-08-XX</span></p>";
|
||||||
|
|
Loading…
Reference in New Issue