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
|
|
|
{
|
|
|
|
/**
|
2018-01-05 04:49:50 +00:00
|
|
|
* Return all of 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
|
|
|
*
|
2020-06-28 22:43:44 +00:00
|
|
|
* @return int|null
|
2017-06-25 20:31:50 +00:00
|
|
|
*/
|
2018-02-03 18:18:18 +00:00
|
|
|
public function deleteUserSession(int $user, string $session);
|
2017-06-25 20:31:50 +00:00
|
|
|
}
|