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
|
|
|
*
|
2017-08-31 02:11:14 +00:00
|
|
|
* @param int $user
|
2018-01-05 04:49:50 +00:00
|
|
|
* @return \Illuminate\Support\Collection
|
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
|
|
|
*
|
2018-02-03 18:18:18 +00:00
|
|
|
* @param int $user
|
|
|
|
* @param string $session
|
2018-01-05 04:49:50 +00:00
|
|
|
* @return null|int
|
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
|
|
|
}
|