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