43 lines
634 B
PHP
43 lines
634 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
interface RepositoryBaseInterface
|
|
{
|
|
/**
|
|
* Get's a record by it's ID
|
|
*
|
|
* @param int
|
|
*/
|
|
public function get($id);
|
|
|
|
/**
|
|
* Get's all records.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function all();
|
|
|
|
/**
|
|
* Deletes a record.
|
|
*
|
|
* @param int
|
|
*/
|
|
public function delete($id): bool;
|
|
|
|
/**
|
|
* Updates a record.
|
|
*
|
|
* @param int
|
|
* @param array
|
|
*/
|
|
public function update($id, array $data): bool;
|
|
|
|
/**
|
|
* create new Record
|
|
*
|
|
* @param array
|
|
*/
|
|
public function add(array $data): ?int;
|
|
}
|