misc_pterodactyl-panel/app/Contracts/Repository/SubuserRepositoryInterface.php

66 lines
1.8 KiB
PHP
Raw Normal View History

<?php
2017-09-25 21:43:01 -05:00
/**
* Pterodactyl - Panel
2017-01-24 17:57:08 -05:00
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
2017-09-25 21:43:01 -05:00
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
2016-12-07 22:46:38 +00:00
2017-08-23 21:34:11 -05:00
namespace Pterodactyl\Contracts\Repository;
2017-08-23 21:34:11 -05:00
interface SubuserRepositoryInterface extends RepositoryInterface
{
/**
* Return a subuser with the associated server relationship.
*
* @param int $id
* @return \Pterodactyl\Models\Subuser
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithServer($id);
2017-09-04 18:12:13 -05: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);
/**
* 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 13:31:18 -05: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);
/**
* 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);
}