mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-06 04:20:48 +00:00
Remapped all library classes.
This commit is contained in:
48
app/lib/FireflyIII/Database/CommonDatabaseCalls.php
Normal file
48
app/lib/FireflyIII/Database/CommonDatabaseCalls.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Database;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Interface CommonDatabaseCalls
|
||||
*
|
||||
* @package FireflyIII\Database
|
||||
*/
|
||||
interface CommonDatabaseCalls
|
||||
{
|
||||
/**
|
||||
* Returns an object with id $id.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Eloquent
|
||||
*/
|
||||
public function find($id);
|
||||
|
||||
/**
|
||||
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
|
||||
*
|
||||
* @param $what
|
||||
*
|
||||
* @return \AccountType|null
|
||||
*/
|
||||
public function findByWhat($what);
|
||||
|
||||
/**
|
||||
* Returns all objects.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function get();
|
||||
|
||||
/**
|
||||
* @param array $ids
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getByIds(array $ids);
|
||||
|
||||
}
|
Reference in New Issue
Block a user