Total Complexity | 8 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | final class SessionConfig extends InjectableConfig |
||
21 | { |
||
22 | public const CONFIG = 'session'; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $config = [ |
||
28 | 'lifetime' => 86400, |
||
29 | 'cookie' => 'SID', |
||
30 | 'secure' => false, |
||
31 | 'sameSite' => null, |
||
32 | 'handler' => null, |
||
33 | 'handlers' => [] |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * @return int |
||
38 | */ |
||
39 | public function getLifetime(): int |
||
40 | { |
||
41 | return $this->config['lifetime']; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getCookie(): string |
||
48 | { |
||
49 | return $this->config['cookie']; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isSecure(): bool |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Get handler autowire options. |
||
62 | * |
||
63 | * @return Autowire|null |
||
64 | */ |
||
65 | public function getHandler(): ?Autowire |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @return string|null |
||
86 | */ |
||
87 | public function getSameSite(): ?string |
||
92 |