mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-02 02:18:20 +00:00
49 lines
865 B
PHP
49 lines
865 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace FireflyIII\Database;
|
||
|
use Illuminate\Support\MessageBag;
|
||
|
use LaravelBook\Ardent\Ardent;
|
||
|
|
||
|
/**
|
||
|
* Interface CUD
|
||
|
* @package FireflyIII\Database
|
||
|
*/
|
||
|
interface CUD
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* @param Ardent $model
|
||
|
*
|
||
|
* @return bool
|
||
|
*/
|
||
|
public function destroy(Ardent $model);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Validates a model. Returns an array containing MessageBags
|
||
|
* errors/warnings/successes.
|
||
|
*
|
||
|
* @param Ardent $model
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function validateObject(Ardent $model);
|
||
|
|
||
|
/**
|
||
|
* Validates an array. Returns an array containing MessageBags
|
||
|
* errors/warnings/successes.
|
||
|
*
|
||
|
* @param array $model
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function validate(array $model);
|
||
|
|
||
|
/**
|
||
|
* @param array $data
|
||
|
*
|
||
|
* @return Ardent
|
||
|
*/
|
||
|
public function store(array $data);
|
||
|
|
||
|
}
|