Files

34 lines
932 B
PHP
Raw Permalink Normal View History

<?php
namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\Location;
use Illuminate\Support\Collection;
interface LocationRepositoryInterface extends RepositoryInterface
{
2017-07-23 14:51:18 -05:00
/**
* Return locations with a count of nodes and servers attached to it.
*/
public function getAllWithDetails(): Collection;
/**
2022-10-14 10:59:20 -06:00
* Return all the available locations with the nodes as a relationship.
*/
public function getAllWithNodes(): Collection;
2017-07-23 14:51:18 -05:00
/**
2022-10-14 10:59:20 -06:00
* Return all the nodes and their respective count of servers for a location.
2017-07-23 14:51:18 -05:00
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodes(int $id): Location;
/**
* Return a location and the count of nodes in that location.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodeCount(int $id): Location;
}