summaryrefslogtreecommitdiff
path: root/ext/session/session.stub.php
blob: e343fc890168593be10dd7088d0737be24c91605 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php

function session_name(string $name = UNKNOWN): string|false {}

function session_module_name(string $module = UNKNOWN): string|false {}

function session_save_path(string $path = UNKNOWN): string|false {}

function session_id(string $id = UNKNOWN): string|false {}

function session_create_id(string $prefix = ""): string|false {}

function session_regenerate_id(bool $delete_old_session = false): bool {}

function session_decode(string $data): bool {}

function session_encode(): string|false {}

function session_destroy(): bool {}

function session_unset(): bool {}

function session_gc(): int|false {}

function session_get_cookie_params(): array {}

function session_write_close(): bool {}

function session_abort(): bool {}

function session_reset(): bool {}

function session_status(): int {}

function session_register_shutdown(): void {}

function session_commit(): bool {}

function session_set_save_handler($open, $close = null, $read = null, $write = null, $destroy = null, $gc = null, $create_sid = null, $validate_sid = null, $update_timestamp = null): bool {}

function session_cache_limiter(string $cache_limiter = UNKNOWN): string|false {}

function session_cache_expire(?int $new_cache_expire = null): int|false {}

function session_set_cookie_params($lifetime_or_options, string $path = UNKNOWN, string $domain  = "", ?bool $secure = null, ?bool $httponly = null): bool {}

function session_start(array $options = []): bool {}

interface SessionHandlerInterface
{
    /** @return bool */
    function open(string $save_path, string $session_name);

    /** @return bool */
    function close();

    /** @return string */
    function read(string $key);

    /** @return bool */
    function write(string $key, string $val);

    /** @return bool */
    function destroy(string $key);

    /** @return int|bool */
    function gc(int $maxlifetime);
}

interface SessionIdInterface
{
    /** @return string */
    function create_sid();
}

interface SessionUpdateTimestampHandlerInterface
{
    /** @return bool */
    function validateId(string $key);

    /** @return bool */
    function updateTimestamp(string $key, string $val);
}