-
Notifications
You must be signed in to change notification settings - Fork 0
/
Session.php
34 lines (29 loc) · 942 Bytes
/
Session.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
namespace Snicco\Component\Session;
use Snicco\Component\Session\Driver\SessionDriver;
use Snicco\Component\Session\Serializer\Serializer;
use Snicco\Component\Session\SessionManager\SessionManagerInterface;
/**
* @psalm-internal Snicco\Component\Session
*/
interface Session extends ImmutableSession, MutableSession
{
/**
* Release all lifecycle events and clear them afterwards.
*
* @return object[]
*/
public function releaseEvents(): array;
/**
* This method is not meant to be used directly by clients. Sessions have to
* be saved through the {@see SessionManagerInterface} After a session has
* been saved any state changing method has to throw {@see SessionIsLocked}.
*/
public function saveUsing(
SessionDriver $driver,
Serializer $serializer,
string $hashed_validator,
int $current_timestamp
): void;
}