firefly-iii/app/lib/FireflyIII/Database/Ifaces/CUD.php
2014-12-06 12:12:55 +01:00

47 lines
748 B
PHP

<?php
namespace FireflyIII\Database\Ifaces;
/**
* Interface CUD
*
* @package FireflyIII\Database
*/
interface CUD
{
/**
* @param \Eloquent $model
*
* @return bool
*/
public function destroy(\Eloquent $model);
/**
* @param array $data
*
* @return \Eloquent
*/
public function store(array $data);
/**
* @param \Eloquent $model
* @param array $data
*
* @return bool
*/
public function update(\Eloquent $model, array $data);
/**
* Validates an array. Returns an array containing MessageBags
* errors/warnings/successes.
*
* @param array $model
*
* @return array
*/
public function validate(array $model);
}