2016-04-26 13:49:22 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* EntryBudget.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
2016-05-20 05:27:31 -05:00
|
|
|
declare(strict_types = 1);
|
|
|
|
|
2016-04-26 13:49:22 -05:00
|
|
|
namespace FireflyIII\Export\Entry;
|
|
|
|
|
|
|
|
use FireflyIII\Models\Budget;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class EntryBudget
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Export\Entry
|
|
|
|
*/
|
|
|
|
class EntryBudget
|
|
|
|
{
|
2016-05-15 10:46:53 -05:00
|
|
|
/** @var int */
|
2016-04-26 14:40:15 -05:00
|
|
|
public $budgetId = '';
|
2016-04-26 13:49:22 -05:00
|
|
|
/** @var string */
|
|
|
|
public $name = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* EntryBudget constructor.
|
|
|
|
*
|
|
|
|
* @param Budget $budget
|
|
|
|
*/
|
|
|
|
public function __construct(Budget $budget = null)
|
|
|
|
{
|
|
|
|
if (!is_null($budget)) {
|
2016-04-26 14:40:15 -05:00
|
|
|
$this->budgetId = $budget->id;
|
|
|
|
$this->name = $budget->name;
|
2016-04-26 13:49:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|