mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 02:52:44 +00:00
Expand helper for #37
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace FireflyIII\Database\TransactionCurrency;
|
namespace FireflyIII\Database\TransactionCurrency;
|
||||||
|
use FireflyIII\Database\CommonDatabaseCalls;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TransactionType
|
* Class TransactionType
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class TransactionCurrency implements TransactionCurrencyInterface
|
class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabaseCalls
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,4 +22,51 @@ class TransactionCurrency implements TransactionCurrencyInterface
|
|||||||
{
|
{
|
||||||
return \TransactionCurrency::whereCode($code)->first();
|
return \TransactionCurrency::whereCode($code)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an object with id $id.
|
||||||
|
*
|
||||||
|
* @param int $objectId
|
||||||
|
*
|
||||||
|
* @return \Eloquent
|
||||||
|
*/
|
||||||
|
public function find($objectId)
|
||||||
|
{
|
||||||
|
// TODO: Implement find() method.
|
||||||
|
throw new NotImplementedException;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds an account type using one of the "$what"'s: expense, asset, revenue, opening, etc.
|
||||||
|
*
|
||||||
|
* @param $what
|
||||||
|
*
|
||||||
|
* @return \AccountType|null
|
||||||
|
*/
|
||||||
|
public function findByWhat($what)
|
||||||
|
{
|
||||||
|
// TODO: Implement findByWhat() method.
|
||||||
|
throw new NotImplementedException;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all objects.
|
||||||
|
*
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function get()
|
||||||
|
{
|
||||||
|
return \TransactionCurrency::orderBy('code','ASC')->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $objectIds
|
||||||
|
*
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getByIds(array $objectIds)
|
||||||
|
{
|
||||||
|
// TODO: Implement getByIds() method.
|
||||||
|
throw new NotImplementedException;
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user