mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 03:47:13 +02:00
Implemented product list
This commit is contained in:
18
src/router/Button.php
Normal file
18
src/router/Button.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace router;
|
||||
|
||||
/**
|
||||
* A button containes out of a link and post parameters
|
||||
* @author kevinfrantz
|
||||
* @deprecated
|
||||
*
|
||||
*/
|
||||
class Button
|
||||
{
|
||||
private $link;
|
||||
|
||||
public function __construct(Link $link,array $post){
|
||||
$this->link;
|
||||
}
|
||||
}
|
||||
|
@@ -2,11 +2,11 @@
|
||||
namespace router;
|
||||
|
||||
/**
|
||||
*
|
||||
* A link containes out of get parameters
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
class Link
|
||||
final class Link
|
||||
{
|
||||
/**
|
||||
* ArrayCollection would be nicer but I have to save time ;)
|
||||
|
@@ -50,7 +50,7 @@ final class Router implements RouterInterface
|
||||
return $userController->register();
|
||||
}
|
||||
case 'product':
|
||||
$productController = new Product();
|
||||
$productController = new Product($this->core);
|
||||
switch ($this->get['action']) {
|
||||
case 'list':
|
||||
return $productController->list();
|
||||
|
Reference in New Issue
Block a user