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
|
|
|
* @return \Illuminate\Support\Collection
|
2017-07-23 19:51:18 +00:00
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getAllWithDetails(): Collection;
|
2017-08-09 04:24:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all of the available locations with the nodes as a relationship.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Support\Collection
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getAllWithNodes(): Collection;
|
2017-07-23 19:51:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all of the nodes and their respective count of servers for a location.
|
|
|
|
*
|
2017-08-22 03:10:48 +00:00
|
|
|
* @param int $id
|
2017-07-23 19:51:18 +00:00
|
|
|
* @return mixed
|
|
|
|
*
|
|
|
|
* @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.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return mixed
|
|
|
|
*
|
|
|
|
* @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
|
|
|
}
|