2014-10-27 23:58:48 -05:00
|
|
|
<?php
|
|
|
|
|
2014-10-30 13:26:28 -05:00
|
|
|
namespace FireflyIII\Database\Ifaces;
|
2014-10-27 23:58:48 -05:00
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
2014-12-06 05:12:55 -06:00
|
|
|
|
2014-10-27 23:58:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface CommonDatabaseCalls
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Database
|
|
|
|
*/
|
|
|
|
interface CommonDatabaseCalls
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns an object with id $id.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
*
|
2014-12-06 05:12:55 -06:00
|
|
|
* @return \Eloquent
|
2014-10-27 23:58:48 -05:00
|
|
|
*/
|
|
|
|
public function find($id);
|
|
|
|
|
2014-11-12 15:37:09 -06:00
|
|
|
/**
|
|
|
|
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
|
|
|
|
*
|
|
|
|
* @param $what
|
|
|
|
*
|
|
|
|
* @return \AccountType|null
|
|
|
|
*/
|
|
|
|
public function findByWhat($what);
|
|
|
|
|
2014-10-27 23:58:48 -05:00
|
|
|
/**
|
|
|
|
* Returns all objects.
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function get();
|
|
|
|
|
2014-10-29 04:30:52 -05:00
|
|
|
/**
|
|
|
|
* @param array $ids
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function getByIds(array $ids);
|
|
|
|
|
2014-10-27 23:58:48 -05:00
|
|
|
}
|