2017-07-03 02:29:58 +00:00
|
|
|
<?php
|
2017-09-26 02:43:01 +00:00
|
|
|
/**
|
2017-07-03 02:29:58 +00:00
|
|
|
* Pterodactyl - Panel
|
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
|
|
*
|
2017-09-26 02:43:01 +00:00
|
|
|
* This software is licensed under the terms of the MIT license.
|
|
|
|
* https://opensource.org/licenses/MIT
|
2017-07-03 02:29:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
|
|
|
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
|
|
|
|
|
|
|
|
interface LocationRepositoryInterface extends RepositoryInterface, SearchableInterface
|
|
|
|
{
|
2017-07-23 19:51:18 +00:00
|
|
|
/**
|
|
|
|
* Return locations with a count of nodes and servers attached to it.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2017-08-09 04:24:55 +00:00
|
|
|
public function getAllWithDetails();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return all of the available locations with the nodes as a relationship.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Support\Collection
|
|
|
|
*/
|
|
|
|
public function getAllWithNodes();
|
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
|
|
|
|
*/
|
|
|
|
public function getWithNodes($id);
|
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
|
|
|
|
*/
|
|
|
|
public function getWithNodeCount($id);
|
2017-07-03 02:29:58 +00:00
|
|
|
}
|