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