2016-11-27 01:29:57 +01:00
|
|
|
<?php
|
2017-09-26 04:43:01 +02:00
|
|
|
/**
|
2016-11-27 01:29:57 +01:00
|
|
|
* Pterodactyl - Panel
|
2017-01-24 23:57:08 +01:00
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
2016-11-27 01:29:57 +01:00
|
|
|
*
|
2017-09-26 04:43:01 +02:00
|
|
|
* This software is licensed under the terms of the MIT license.
|
|
|
|
* https://opensource.org/licenses/MIT
|
2016-11-27 01:29:57 +01:00
|
|
|
*/
|
2016-12-07 23:46:38 +01:00
|
|
|
|
2017-08-24 04:34:11 +02:00
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
2016-11-27 01:29:57 +01:00
|
|
|
|
2017-08-24 04:34:11 +02:00
|
|
|
interface SubuserRepositoryInterface extends RepositoryInterface
|
2016-11-27 01:29:57 +01:00
|
|
|
{
|
2017-08-27 01:08:11 +02:00
|
|
|
/**
|
|
|
|
* Return a subuser with the associated server relationship.
|
|
|
|
*
|
|
|
|
* @param int $id
|
2017-09-25 04:12:30 +02:00
|
|
|
* @return \Pterodactyl\Models\Subuser
|
2017-08-27 01:08:11 +02:00
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
|
|
|
public function getWithServer($id);
|
|
|
|
|
2017-09-05 01:12:13 +02:00
|
|
|
/**
|
|
|
|
* Return a subuser with the associated permissions relationship.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Database\Eloquent\Collection
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
|
|
|
public function getWithPermissions($id);
|
|
|
|
|
2017-09-24 03:45:25 +02:00
|
|
|
/**
|
|
|
|
* Return a subuser and associated permissions given a user_id and server_id.
|
|
|
|
*
|
|
|
|
* @param int $user
|
|
|
|
* @param int $server
|
|
|
|
* @return \Pterodactyl\Models\Subuser
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
|
|
|
public function getWithPermissionsUsingUserAndServer($user, $server);
|
|
|
|
|
2017-08-26 20:31:18 +02:00
|
|
|
/**
|
|
|
|
* Find a subuser and return with server and permissions relationships.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Database\Eloquent\Collection
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
|
|
|
public function getWithServerAndPermissions($id);
|
2017-09-24 03:45:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a subuser and their associated connection key for a server.
|
|
|
|
*
|
|
|
|
* @param int $user
|
|
|
|
* @param int $server
|
|
|
|
* @return \Pterodactyl\Models\Subuser
|
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
|
|
|
*/
|
|
|
|
public function getWithKey($user, $server);
|
2016-11-27 01:29:57 +01:00
|
|
|
}
|