Added Repository draft

This commit is contained in:
Kevin Frantz 2018-07-14 00:46:40 +02:00
parent 562f12c059
commit db1a0acd80
3 changed files with 66 additions and 0 deletions

View 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;
}

View 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;
}

View 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;
}