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