Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSessionStorage.php
More file actions
Latest commit
63 lines (52 loc) · 1.27 KB
/
Copy pathSessionStorage.php
File metadata and controls
63 lines (52 loc) · 1.27 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/*
* This file is part of Polymorphine/Session package.
*
* (c) Shudd3r <q3.shudder@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespacePolymorphine\Session;
interface SessionStorage
{
publicconstUSER_KEY = 'session.user.id';
/**
* By default an alias to SessionStorage::get('session.user.id').
*
* @return mixed User id stored within session data
*/
publicfunctionuserId(): ?string;
/**
* By default an alias to SessionStorage::set('session.user.id', $value).
*
* @param string|null $userId
*/
publicfunctionnewUserContext(?string$userId = null): void;
/**
* @param string $key
*
* @return bool
*/
publicfunctionhas(string$key): bool;
/**
* @param string $key
* @param null $default
*
* @return mixed
*/
publicfunctionget(string$key, $default = null);
/**
* @param string $key
* @param mixed $value
*/
publicfunctionset(string$key, $value): void;
/**
* @param string $key
*/
publicfunctionremove(string$key): void;
/**
* Removes all data stored in session.
*/
publicfunctionclear(): void;
}