Interface und Fehlerklassen für die Repositories bestimmt.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user