mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-04 05:15:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			87 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			87 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * AccountRepositoryInterface.php
 | 
						|
 * Copyright (C) 2016 thegrumpydictator@gmail.com
 | 
						|
 *
 | 
						|
 * This software may be modified and distributed under the terms of the
 | 
						|
 * Creative Commons Attribution-ShareAlike 4.0 International License.
 | 
						|
 *
 | 
						|
 * See the LICENSE file for details.
 | 
						|
 */
 | 
						|
 | 
						|
declare(strict_types = 1);
 | 
						|
 | 
						|
namespace FireflyIII\Repositories\Account;
 | 
						|
 | 
						|
use Carbon\Carbon;
 | 
						|
use FireflyIII\Models\Account;
 | 
						|
 | 
						|
/**
 | 
						|
 * Interface AccountRepositoryInterface
 | 
						|
 *
 | 
						|
 * @package FireflyIII\Repositories\Account
 | 
						|
 */
 | 
						|
interface AccountRepositoryInterface
 | 
						|
{
 | 
						|
 | 
						|
    /**
 | 
						|
     * Moved here from account CRUD.
 | 
						|
     *
 | 
						|
     * @param array $types
 | 
						|
     *
 | 
						|
     * @return int
 | 
						|
     */
 | 
						|
    public function count(array $types): int;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @param string $name
 | 
						|
     * @param array  $types
 | 
						|
     *
 | 
						|
     * @return Account
 | 
						|
     */
 | 
						|
    public function findByName(string $name, array $types): Account;
 | 
						|
 | 
						|
    /**
 | 
						|
     * Moved here from account CRUD.
 | 
						|
     *
 | 
						|
     * @param Account $account
 | 
						|
     * @param Account $moveTo
 | 
						|
     *
 | 
						|
     * @return bool
 | 
						|
     */
 | 
						|
    public function destroy(Account $account, Account $moveTo): bool;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @param int $accountId
 | 
						|
     *
 | 
						|
     * @return Account
 | 
						|
     */
 | 
						|
    public function find(int $accountId): Account;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @param string $number
 | 
						|
     * @param array  $types
 | 
						|
     *
 | 
						|
     * @return Account
 | 
						|
     */
 | 
						|
    public function findByAccountNumber(string $number, array $types): Account;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @param string $iban
 | 
						|
     * @param array  $types
 | 
						|
     *
 | 
						|
     * @return Account
 | 
						|
     */
 | 
						|
    public function findByIban(string $iban, array $types): Account;
 | 
						|
 | 
						|
    /**
 | 
						|
     * Returns the date of the very first transaction in this account.
 | 
						|
     *
 | 
						|
     * @param Account $account
 | 
						|
     *
 | 
						|
     * @return Carbon
 | 
						|
     */
 | 
						|
    public function oldestJournalDate(Account $account): Carbon;
 | 
						|
 | 
						|
}
 |