2017-06-25 15:31:50 -05:00
|
|
|
<?php
|
|
|
|
|
2017-08-30 21:11:14 -05:00
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
2017-06-25 15:31:50 -05:00
|
|
|
|
2018-01-04 22:49:50 -06:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
2017-08-30 21:11:14 -05:00
|
|
|
interface SessionRepositoryInterface extends RepositoryInterface
|
2017-06-25 15:31:50 -05:00
|
|
|
{
|
|
|
|
/**
|
2022-10-14 10:59:20 -06:00
|
|
|
* Return all the active sessions for a user.
|
2017-06-25 15:31:50 -05:00
|
|
|
*/
|
2018-01-04 22:49:50 -06:00
|
|
|
public function getUserSessions(int $user): Collection;
|
2017-06-25 15:31:50 -05:00
|
|
|
|
|
|
|
/**
|
2018-01-04 22:49:50 -06:00
|
|
|
* Delete a session for a given user.
|
2017-06-25 15:31:50 -05:00
|
|
|
*/
|
2022-10-14 10:59:20 -06:00
|
|
|
public function deleteUserSession(int $user, string $session): ?int;
|
2017-06-25 15:31:50 -05:00
|
|
|
}
|