mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
48 lines
807 B
PHP
48 lines
807 B
PHP
<?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);
|
|
|
|
}
|