mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 11:57:12 +02:00
Added first draft Homepage
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace router;
|
||||
|
||||
use core\CoreInterface;
|
||||
use controller\standart\Standart;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -10,19 +11,58 @@ use core\CoreInterface;
|
||||
*/
|
||||
final class Router implements RouterInterface
|
||||
{
|
||||
public function route()
|
||||
/**
|
||||
* @var CoreInterface
|
||||
*/
|
||||
private $core;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $get;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $post;
|
||||
|
||||
public function route():void
|
||||
{
|
||||
echo "Hello World!";
|
||||
if($this->post['route']){
|
||||
$this->postRouting();
|
||||
}
|
||||
if($this->get['router']){
|
||||
$this->getRouting();
|
||||
}else{
|
||||
$standart = new Standart($this->core);
|
||||
$standart->homepage();
|
||||
}
|
||||
}
|
||||
|
||||
private function postRouting():void{
|
||||
|
||||
}
|
||||
|
||||
private function getRouting():void{
|
||||
|
||||
}
|
||||
|
||||
public function setGet(array $get)
|
||||
{}
|
||||
public function setGet(array $get):void
|
||||
{
|
||||
$this->get = $get;
|
||||
}
|
||||
|
||||
public function setCore(CoreInterface $core)
|
||||
{}
|
||||
public function setCore(CoreInterface $core):void
|
||||
{
|
||||
$this->core = $core;
|
||||
}
|
||||
|
||||
public function setPost(array $post): void
|
||||
{}
|
||||
{
|
||||
$this->post = $post;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user