2017-07-03 02:29:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-05 04:49:50 +00:00
|
|
|
use Pterodactyl\Models\Location;
|
|
|
|
use Illuminate\Support\Collection;
|
2017-07-03 02:29:58 +00:00
|
|
|
|
2020-09-13 18:29:47 +00:00
|
|
|
interface LocationRepositoryInterface extends RepositoryInterface
|
2017-07-03 02:29:58 +00:00
|
|
|
{
|
2017-07-23 19:51:18 +00:00
|
|
|
/**
|
|
|
|
* Return locations with a count of nodes and servers attached to it.
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getAllWithDetails(): Collection;
|
2017-08-09 04:24:55 +00:00
|
|
|
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* Return all the available locations with the nodes as a relationship.
|
2017-08-09 04:24:55 +00:00
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getAllWithNodes(): Collection;
|
2017-07-23 19:51:18 +00:00
|
|
|
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* Return all the nodes and their respective count of servers for a location.
|
2017-07-23 19:51:18 +00:00
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getWithNodes(int $id): Location;
|
2017-09-15 05:16:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a location and the count of nodes in that location.
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getWithNodeCount(int $id): Location;
|
2017-07-03 02:29:58 +00:00
|
|
|
}
|