firefly-iii/app/Repositories/ExportJob/ExportJobRepositoryInterface.php

77 lines
1.8 KiB
PHP
Raw Normal View History

2016-02-04 10:16:16 -06:00
<?php
/**
* ExportJobRepositoryInterface.php
2017-10-21 01:40:00 -05:00
* Copyright (c) 2017 thegrumpydictator@gmail.com
2016-02-04 10:16:16 -06:00
*
2017-10-21 01:40:00 -05:00
* This file is part of Firefly III.
*
2017-10-21 01:40:00 -05:00
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
2016-02-04 10:16:16 -06:00
*/
declare(strict_types=1);
2016-02-04 10:16:16 -06:00
namespace FireflyIII\Repositories\ExportJob;
use FireflyIII\Models\ExportJob;
use FireflyIII\User;
2016-02-04 10:16:16 -06:00
/**
2017-11-15 05:25:49 -06:00
* Interface ExportJobRepositoryInterface.
2016-02-04 10:16:16 -06:00
*/
interface ExportJobRepositoryInterface
{
/**
2016-12-30 06:47:23 -06:00
* @param ExportJob $job
* @param string $status
*
2016-02-04 10:16:16 -06:00
* @return bool
*/
2016-12-30 06:47:23 -06:00
public function changeStatus(ExportJob $job, string $status): bool;
2016-02-04 10:16:16 -06:00
/**
2016-12-30 06:47:23 -06:00
* @return bool
2016-02-04 10:16:16 -06:00
*/
2016-12-30 06:47:23 -06:00
public function cleanup(): bool;
2016-02-04 10:16:16 -06:00
2016-12-27 08:46:52 -06:00
/**
2016-12-30 06:47:23 -06:00
* @return ExportJob
2016-12-27 08:46:52 -06:00
*/
2016-12-30 06:47:23 -06:00
public function create(): ExportJob;
2016-12-27 08:46:52 -06:00
2016-12-25 05:55:22 -06:00
/**
* @param ExportJob $job
*
* @return bool
*/
public function exists(ExportJob $job): bool;
2016-02-04 10:16:16 -06:00
/**
2016-02-05 02:25:15 -06:00
* @param string $key
2016-02-04 10:16:16 -06:00
*
2017-01-14 11:52:52 -06:00
* @return ExportJob
2016-02-04 10:16:16 -06:00
*/
2016-04-05 15:00:03 -05:00
public function findByKey(string $key): ExportJob;
2016-02-04 10:16:16 -06:00
2016-12-25 05:55:22 -06:00
/**
* @param ExportJob $job
*
* @return string
*/
public function getContent(ExportJob $job): string;
2017-01-30 09:46:30 -06:00
/**
* @param User $user
*/
public function setUser(User $user);
2016-02-10 09:01:18 -06:00
}