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

38 lines
1.1 KiB
PHP
Raw Normal View History

<?php
2016-12-07 22:46:38 +00:00
2017-08-24 02:34:11 +00:00
namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\Subuser;
2017-08-24 02:34:11 +00:00
interface SubuserRepositoryInterface extends RepositoryInterface
{
/**
* Return a subuser with the associated server relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
2019-09-06 04:32:57 +00:00
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function loadServerAndUserRelations(Subuser $subuser, bool $refresh = false): Subuser;
2017-09-04 23:12:13 +00:00
/**
* Return a subuser with the associated permissions relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
2019-09-06 04:32:57 +00:00
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
2017-09-04 23:12:13 +00:00
*/
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser;
2017-09-04 23:12:13 +00: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(int $user, int $server): Subuser;
}