mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 23:24:07 -06:00
67 lines
1.1 KiB
PHP
67 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace FireflyIII\Helpers\Collection;
|
|
|
|
use FireflyIII\Models\Budget as BudgetModel;
|
|
use Illuminate\Support\Collection;
|
|
|
|
/**
|
|
* Class BalanceLine
|
|
*
|
|
* @package FireflyIII\Helpers\Collection
|
|
*/
|
|
class BalanceLine
|
|
{
|
|
|
|
/** @var Collection */
|
|
protected $balanceEntries;
|
|
/** @var BudgetModel */
|
|
protected $budget;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->balanceEntries = new Collection;
|
|
}
|
|
|
|
public function addBalanceEntry(BalanceEntry $balanceEntry)
|
|
{
|
|
$this->balanceEntries->push($balanceEntry);
|
|
}
|
|
|
|
/**
|
|
* @return Collection
|
|
*/
|
|
public function getBalanceEntries()
|
|
{
|
|
return $this->balanceEntries;
|
|
}
|
|
|
|
/**
|
|
* @param Collection $balanceEntries
|
|
*/
|
|
public function setBalanceEntries($balanceEntries)
|
|
{
|
|
$this->balanceEntries = $balanceEntries;
|
|
}
|
|
|
|
/**
|
|
* @return BudgetModel
|
|
*/
|
|
public function getBudget()
|
|
{
|
|
return $this->budget;
|
|
}
|
|
|
|
/**
|
|
* @param BudgetModel $budget
|
|
*/
|
|
public function setBudget($budget)
|
|
{
|
|
$this->budget = $budget;
|
|
}
|
|
|
|
|
|
} |