Interface und Fehlerklassen für die Repositories bestimmt.

This commit is contained in:
2021-03-30 13:31:18 +02:00
parent e6b9180432
commit 5141fff827
5 changed files with 91 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
namespace TorstenHettstedt\TimekeepingApi\Repositories;
/**
* @template T of \TorstenHettstedt\TimekeepingApi\Models\ModelInterface
*/
interface RepositoryWriterInterface
{
/**
* @param T $model
*
* @throws UnsupportedModelException
*/
public function insert(mixed $model): void;
/**
* @param T $model
*
* @throws UnsupportedModelException
*/
public function update(mixed $model): void;
/**
* @param T $model
*
* @throws UnsupportedModelException
*/
public function delete(mixed $model): void;
}