2015-05-16 07:51:23 -05:00
|
|
|
<?php
|
2016-02-05 05:08:25 -06:00
|
|
|
declare(strict_types = 1);
|
2015-05-16 07:51:23 -05:00
|
|
|
namespace FireflyIII\Helpers\Collection;
|
|
|
|
|
|
|
|
use FireflyIII\Models\Account as AccountModel;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
/**
|
2015-05-16 12:08:54 -05:00
|
|
|
* @codeCoverageIgnore
|
|
|
|
*
|
2015-05-16 07:51:23 -05: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 03:04:26 -06:00
|
|
|
public function getAccounts(): Collection
|
2015-05-16 07:51:23 -05:00
|
|
|
{
|
|
|
|
return $this->accounts;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-20 12:56:14 -05:00
|
|
|
}
|