mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 03:51:18 +00:00
Some refactoring [skip ci]
This commit is contained in:
47
app/lib/FireflyIII/Database/CommonDatabaseCallsInterface.php
Normal file
47
app/lib/FireflyIII/Database/CommonDatabaseCallsInterface.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Database;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
/**
|
||||
* Interface CommonDatabaseCalls
|
||||
*
|
||||
* @package FireflyIII\Database
|
||||
*/
|
||||
interface CommonDatabaseCallsInterface
|
||||
{
|
||||
/**
|
||||
* Returns an object with id $id.
|
||||
*
|
||||
* @param int $objectId
|
||||
*
|
||||
* @return \Eloquent
|
||||
*/
|
||||
public function find($objectId);
|
||||
|
||||
/**
|
||||
* 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 $objectIds
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getByIds(array $objectIds);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user