2014-10-28 05:58:48 +01:00
|
|
|
<?php
|
|
|
|
|
2014-12-13 22:11:51 +01:00
|
|
|
namespace FireflyIII\Database;
|
2014-10-28 05:58:48 +01:00
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
2014-12-06 12:12:55 +01:00
|
|
|
|
2014-10-28 05:58:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface CommonDatabaseCalls
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Database
|
|
|
|
*/
|
|
|
|
interface CommonDatabaseCalls
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns an object with id $id.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
*
|
2014-12-06 12:12:55 +01:00
|
|
|
* @return \Eloquent
|
2014-10-28 05:58:48 +01:00
|
|
|
*/
|
|
|
|
public function find($id);
|
|
|
|
|
2014-11-12 22:37:09 +01: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-28 05:58:48 +01:00
|
|
|
/**
|
|
|
|
* Returns all objects.
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function get();
|
|
|
|
|
2014-10-29 10:30:52 +01:00
|
|
|
/**
|
|
|
|
* @param array $ids
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function getByIds(array $ids);
|
|
|
|
|
2014-10-28 05:58:48 +01:00
|
|
|
}
|