mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2024-11-01 00:53:10 +01:00
Added Repository draft
This commit is contained in:
parent
562f12c059
commit
db1a0acd80
20
src/repository/order/OrderInterface.php
Normal file
20
src/repository/order/OrderInterface.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
namespace repository\order;
|
||||||
|
|
||||||
|
use entity\order\OrderInterface as OrderEntityInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface OrderInterface
|
||||||
|
{
|
||||||
|
public function saveOrder(OrderEntityInterface $order):void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function just exists for maintaining reasons
|
||||||
|
*/
|
||||||
|
public function deleteAllOrders():void;
|
||||||
|
}
|
||||||
|
|
24
src/repository/product/ProductInterface.php
Normal file
24
src/repository/product/ProductInterface.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
namespace repository\product;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use entity\product\ProductInterface as ProductEntityInterface;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface ProductInterface
|
||||||
|
{
|
||||||
|
public function getAllProducts():ArrayCollection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Just exists for maintaining reasons ;)
|
||||||
|
*/
|
||||||
|
public function deleteAllProducts():void;
|
||||||
|
|
||||||
|
public function addProducts(ArrayCollection $products):void;
|
||||||
|
|
||||||
|
public function getProductById(int $id):ProductEntityInterface;
|
||||||
|
}
|
||||||
|
|
22
src/repository/user/UserInterface.php
Normal file
22
src/repository/user/UserInterface.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
namespace repository\user;
|
||||||
|
|
||||||
|
use entity\user\UserInterface as UserEntityInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface UserInterface
|
||||||
|
{
|
||||||
|
public function addUser(UserEntityInterface $user):void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function just exist for maintaining reasons
|
||||||
|
*/
|
||||||
|
public function deleteAllUsers():void;
|
||||||
|
|
||||||
|
public function getUserByMailAndHash(string $mail,string $hash):UserEntityInterface;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user