2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
2017-07-01 20:29:49 +00:00
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
2015-12-06 18:58:49 +00:00
|
|
|
|
2018-01-05 04:49:50 +00:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
2017-07-01 20:29:49 +00:00
|
|
|
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
|
|
|
|
|
2020-09-13 18:29:47 +00:00
|
|
|
interface UserRepositoryInterface extends RepositoryInterface
|
2016-12-07 22:46:38 +00:00
|
|
|
{
|
2017-07-08 19:07:51 +00:00
|
|
|
/**
|
|
|
|
* Return all users with counts of servers and subusers of servers.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
|
|
|
*/
|
2018-01-05 04:49:50 +00:00
|
|
|
public function getAllUsersWithCounts(): LengthAwarePaginator;
|
2017-07-01 20:29:49 +00:00
|
|
|
|
2017-07-22 18:55:30 +00:00
|
|
|
/**
|
|
|
|
* Return all matching models for a user in a format that can be used for dropdowns.
|
|
|
|
*
|
2018-05-21 00:00:50 +00:00
|
|
|
* @param string|null $query
|
2018-01-05 04:49:50 +00:00
|
|
|
* @return \Illuminate\Support\Collection
|
2017-07-22 18:55:30 +00:00
|
|
|
*/
|
2018-05-21 00:00:50 +00:00
|
|
|
public function filterUsersByQuery(?string $query): Collection;
|
2020-04-11 19:56:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a user with the given id in a format that can be used for dropdowns.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Pterodactyl\Models\Model
|
|
|
|
*/
|
|
|
|
public function filterById(int $id): \Pterodactyl\Models\Model;
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|