2015-05-16 14:51:23 +02:00
|
|
|
<?php
|
2016-05-20 12:27:31 +02:00
|
|
|
/**
|
|
|
|
* BalanceHeader.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-05 06:52:15 +02:00
|
|
|
* 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.
|
2016-05-20 12:27:31 +02:00
|
|
|
*/
|
|
|
|
|
2016-02-05 12:08:25 +01:00
|
|
|
declare(strict_types = 1);
|
2015-05-16 14:51:23 +02:00
|
|
|
namespace FireflyIII\Helpers\Collection;
|
|
|
|
|
|
|
|
use FireflyIII\Models\Account as AccountModel;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
/**
|
2015-05-16 19:08:54 +02:00
|
|
|
*
|
2015-05-16 14:51:23 +02:00
|
|
|
* Class BalanceHeader
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Collection
|
|
|
|
*/
|
|
|
|
class BalanceHeader
|
|
|
|
{
|
|
|
|
|
|
|
|
/** @var Collection */
|
|
|
|
protected $accounts;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->accounts = new Collection;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param AccountModel $account
|
|
|
|
*/
|
|
|
|
public function addAccount(AccountModel $account)
|
|
|
|
{
|
|
|
|
$this->accounts->push($account);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Collection
|
|
|
|
*/
|
2016-02-18 10:04:26 +01:00
|
|
|
public function getAccounts(): Collection
|
2015-05-16 14:51:23 +02:00
|
|
|
{
|
|
|
|
return $this->accounts;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-20 19:56:14 +02:00
|
|
|
}
|