Files

76 lines
1.9 KiB
PHP
Raw Permalink Normal View History

2026-02-21 06:25:18 +01:00
<?php
2026-02-21 06:38:43 +01:00
declare(strict_types=1);
2026-02-21 06:25:18 +01:00
/*
* UpdateResponse.php
* Copyright (c) 2026 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Services\FireflyIIIOrg\Update;
use Carbon\Carbon;
class UpdateResponse
{
private bool $newVersionAvailable = false;
private string $error = '';
private string $newVersion = '1.0.0';
private Carbon $publishedAt;
2026-02-21 06:38:43 +01:00
public function getError(): string
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
return $this->error;
2026-02-21 06:25:18 +01:00
}
2026-02-21 06:38:43 +01:00
public function getNewVersion(): string
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
return $this->newVersion;
2026-02-21 06:25:18 +01:00
}
2026-02-21 06:38:43 +01:00
public function getPublishedAt(): Carbon
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
return $this->publishedAt;
2026-02-21 06:25:18 +01:00
}
2026-02-21 06:38:43 +01:00
public function isNewVersionAvailable(): bool
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
return $this->newVersionAvailable;
2026-02-21 06:25:18 +01:00
}
2026-02-21 06:38:43 +01:00
public function setError(string $error): void
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
$this->error = $error;
2026-02-21 06:25:18 +01:00
}
public function setNewVersion(string $newVersion): void
{
$this->newVersion = $newVersion;
}
2026-02-21 06:38:43 +01:00
public function setNewVersionAvailable(bool $newVersionAvailable): void
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
$this->newVersionAvailable = $newVersionAvailable;
2026-02-21 06:25:18 +01:00
}
2026-02-21 06:38:43 +01:00
public function setPublishedAt(Carbon $publishedAt): void
2026-02-21 06:25:18 +01:00
{
2026-02-21 06:38:43 +01:00
$this->publishedAt = $publishedAt;
2026-02-21 06:25:18 +01:00
}
}