2017-07-02 21:29:58 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
2018-01-04 22:49:50 -06:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Pterodactyl\Models\DatabaseHost;
|
|
|
|
|
2017-07-15 11:52:34 -05:00
|
|
|
interface DatabaseHostRepositoryInterface extends RepositoryInterface
|
2017-07-02 21:29:58 -05:00
|
|
|
{
|
2017-08-08 23:24:55 -05:00
|
|
|
/**
|
2018-01-04 22:49:50 -06:00
|
|
|
* Return database hosts with a count of databases and the node
|
|
|
|
* information for which it is attached.
|
2017-08-08 23:24:55 -05:00
|
|
|
*
|
|
|
|
* @return \Illuminate\Support\Collection
|
|
|
|
*/
|
2018-01-04 22:49:50 -06:00
|
|
|
public function getWithViewDetails(): Collection;
|
2017-08-08 23:24:55 -05:00
|
|
|
|
2017-08-15 23:16:00 -05:00
|
|
|
/**
|
2018-01-04 22:49:50 -06:00
|
|
|
* Return a database host with the databases and associated servers
|
|
|
|
* that are attached to said databases.
|
2017-08-15 23:16:00 -05:00
|
|
|
*
|
2017-08-21 22:10:48 -05:00
|
|
|
* @param int $id
|
2018-01-04 22:49:50 -06:00
|
|
|
* @return \Pterodactyl\Models\DatabaseHost
|
2017-08-15 23:16:00 -05:00
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
2018-01-04 22:49:50 -06:00
|
|
|
public function getWithServers(int $id): DatabaseHost;
|
2017-07-02 21:29:58 -05:00
|
|
|
}
|