2017-09-10 04:55:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-05 04:49:50 +00:00
|
|
|
use Pterodactyl\Models\Task;
|
|
|
|
|
2017-09-10 04:55:21 +00:00
|
|
|
interface TaskRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
2017-09-17 04:10:00 +00:00
|
|
|
/**
|
|
|
|
* Get a task and the server relationship for that task.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Pterodactyl\Models\Task
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getTaskWithServer(int $id): Task;
|
2017-09-17 04:10:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the next task in a schedule.
|
|
|
|
*
|
2018-01-05 04:49:50 +00:00
|
|
|
* @param int $schedule
|
|
|
|
* @param int $index
|
2017-09-17 04:10:00 +00:00
|
|
|
* @return null|\Pterodactyl\Models\Task
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getNextTask(int $schedule, int $index);
|
2017-09-10 04:55:21 +00:00
|
|
|
}
|