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

47 lines
806 B
PHP
Raw Normal View History

<?php
2014-12-13 15:11:51 -06:00
namespace FireflyIII\Database;
use Illuminate\Support\Collection;
2014-12-06 05:12:55 -06:00
/**
* Interface CommonDatabaseCalls
*
* @package FireflyIII\Database
*/
2015-01-01 23:05:40 -06:00
interface CommonDatabaseCallsInterface
{
/**
* Returns an object with id $id.
*
2014-12-19 14:18:42 -06:00
* @param int $objectId
*
2014-12-06 05:12:55 -06:00
* @return \Eloquent
*/
2014-12-19 14:18:42 -06:00
public function find($objectId);
2014-11-12 15:37:09 -06:00
/**
* 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();
2014-10-29 04:30:52 -05:00
/**
2014-12-19 14:18:42 -06:00
* @param array $objectIds
2014-10-29 04:30:52 -05:00
*
* @return Collection
*/
2014-12-19 14:18:42 -06:00
public function getByIds(array $objectIds);
2014-10-29 04:30:52 -05:00
}