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