Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Contracts/Repository/LocationRepositoryInterface.php
10262 views
1
<?php
2
3
namespace Pterodactyl\Contracts\Repository;
4
5
use Pterodactyl\Models\Location;
6
use Illuminate\Support\Collection;
7
8
interface LocationRepositoryInterface extends RepositoryInterface
9
{
10
/**
11
* Return locations with a count of nodes and servers attached to it.
12
*/
13
public function getAllWithDetails(): Collection;
14
15
/**
16
* Return all the available locations with the nodes as a relationship.
17
*/
18
public function getAllWithNodes(): Collection;
19
20
/**
21
* Return all the nodes and their respective count of servers for a location.
22
*
23
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
24
*/
25
public function getWithNodes(int $id): Location;
26
27
/**
28
* Return a location and the count of nodes in that location.
29
*
30
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
31
*/
32
public function getWithNodeCount(int $id): Location;
33
}
34
35