Files
pterodactyl-panel/app/Contracts/Repository/ScheduleRepositoryInterface.php
T

46 lines
1.3 KiB
PHP
Raw Normal View History

2017-09-09 23:55:21 -05:00
<?php
namespace Pterodactyl\Contracts\Repository;
2017-09-09 23:55:21 -05:00
2017-10-27 21:42:53 -05:00
use Pterodactyl\Models\Schedule;
use Illuminate\Support\Collection;
interface ScheduleRepositoryInterface extends RepositoryInterface
2017-09-09 23:55:21 -05:00
{
/**
* Return all of the schedules for a given server.
*
* @param int $server
2017-10-27 21:42:53 -05:00
* @return \Illuminate\Support\Collection
*/
2017-10-27 21:42:53 -05:00
public function findServerSchedules(int $server): Collection;
2017-09-09 23:55:21 -05:00
/**
* Load the tasks relationship onto the Schedule module if they are not
* already present.
*
* @param \Pterodactyl\Models\Schedule $schedule
2019-09-05 21:32:57 -07:00
* @param bool $refresh
* @return \Pterodactyl\Models\Schedule
*/
public function loadTasks(Schedule $schedule, bool $refresh = false): Schedule;
/**
* Return a schedule model with all of the associated tasks as a relationship.
*
* @param int $schedule
2017-10-27 21:42:53 -05:00
* @return \Pterodactyl\Models\Schedule
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
2017-10-27 21:42:53 -05:00
public function getScheduleWithTasks(int $schedule): Schedule;
2017-09-16 23:10:00 -05:00
/**
* Return all of the schedules that should be processed.
*
* @param string $timestamp
* @return \Illuminate\Support\Collection
*/
public function getSchedulesToProcess(string $timestamp): Collection;
2017-09-09 23:55:21 -05:00
}