2017-09-10 04:55:21 +00:00
|
|
|
<?php
|
2017-09-26 02:43:01 +00:00
|
|
|
/**
|
2017-09-10 04:55:21 +00:00
|
|
|
* Pterodactyl - Panel
|
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
|
|
*
|
2017-09-26 02:43:01 +00:00
|
|
|
* This software is licensed under the terms of the MIT license.
|
|
|
|
* https://opensource.org/licenses/MIT
|
2017-09-10 04:55:21 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
public function getTaskWithServer($id);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the next task in a schedule.
|
|
|
|
*
|
|
|
|
* @param int $schedule the ID of the schedule to select the next task from
|
|
|
|
* @param int $index the index of the current task
|
|
|
|
* @return null|\Pterodactyl\Models\Task
|
|
|
|
*/
|
|
|
|
public function getNextTask($schedule, $index);
|
2017-09-10 04:55:21 +00:00
|
|
|
}
|