firefly-iii/app/lib/FireflyIII/Database/CommonDatabaseCalls.php

47 lines
765 B
PHP
Raw Normal View History

<?php
/**
* Created by PhpStorm.
* User: sander
* Date: 14/10/14
* Time: 09:31
*/
namespace FireflyIII\Database;
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();
/**
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
*
* @param $what
*
* @return \AccountType|null
*/
public function findByWhat($what);
}