@@ -12,72 +12,72 @@ public function configFromArray(array $settings): Config
12
12
{
13
13
$ config = new Config ();
14
14
15
- if (isset ($ settings [" save_path " ])) {
16
- $ config ->setSavePath ($ settings [" save_path " ]);
15
+ if (isset ($ settings [' save_path ' ])) {
16
+ $ config ->setSavePath ($ settings [' save_path ' ]);
17
17
}
18
18
19
- if (isset ($ settings [" save_handler " ])) {
20
- $ config ->setSaveHandler ($ settings [" save_handler " ]);
19
+ if (isset ($ settings [' save_handler ' ])) {
20
+ $ config ->setSaveHandler ($ settings [' save_handler ' ]);
21
21
}
22
22
23
- if (isset ($ settings [" serialize_handler " ])) {
23
+ if (isset ($ settings [' serialize_handler ' ])) {
24
24
$ config ->setSerializeHandler (
25
- Serializers \Factory::auto ($ settings [" serialize_handler " ])
25
+ Serializers \Factory::auto ($ settings [' serialize_handler ' ])
26
26
);
27
27
}
28
28
29
- if (isset ($ settings [" name " ])) {
30
- $ config ->setName ($ settings [" name " ]);
29
+ if (isset ($ settings [' name ' ])) {
30
+ $ config ->setName ($ settings [' name ' ]);
31
31
}
32
32
33
- if (isset ($ settings [" cookie_lifetime " ])) {
34
- $ config ->setCookieLifetime ((int ) $ settings [" cookie_lifetime " ]);
33
+ if (isset ($ settings [' cookie_lifetime ' ])) {
34
+ $ config ->setCookieLifetime ((int ) $ settings [' cookie_lifetime ' ]);
35
35
}
36
- if (isset ($ settings [" cookie_path " ])) {
37
- $ config ->setCookiePath ($ settings [" cookie_path " ]);
36
+ if (isset ($ settings [' cookie_path ' ])) {
37
+ $ config ->setCookiePath ($ settings [' cookie_path ' ]);
38
38
}
39
- if (isset ($ settings [" cookie_domain " ])) {
40
- $ config ->setCookieDomain ($ settings [" cookie_domain " ]);
39
+ if (isset ($ settings [' cookie_domain ' ])) {
40
+ $ config ->setCookieDomain ($ settings [' cookie_domain ' ]);
41
41
}
42
- if (isset ($ settings [" cookie_secure " ])) {
43
- $ config ->setCookieSecure ((bool ) $ settings [" cookie_secure " ]);
42
+ if (isset ($ settings [' cookie_secure ' ])) {
43
+ $ config ->setCookieSecure ((bool ) $ settings [' cookie_secure ' ]);
44
44
}
45
- if (isset ($ settings [" cookie_httponly " ])) {
46
- $ config ->setCookieHttpOnly ((bool ) $ settings [" cookie_httponly " ]);
45
+ if (isset ($ settings [' cookie_httponly ' ])) {
46
+ $ config ->setCookieHttpOnly ((bool ) $ settings [' cookie_httponly ' ]);
47
47
}
48
- if (isset ($ settings [" cookie_samesite " ])) {
49
- $ config ->setCookieSameSite ($ settings [" cookie_samesite " ]);
48
+ if (isset ($ settings [' cookie_samesite ' ])) {
49
+ $ config ->setCookieSameSite ($ settings [' cookie_samesite ' ]);
50
50
}
51
51
52
- if (isset ($ settings [" cache_limiter " ])) {
53
- $ config ->setCacheLimiter ($ settings [" cache_limiter " ]);
52
+ if (isset ($ settings [' cache_limiter ' ])) {
53
+ $ config ->setCacheLimiter ($ settings [' cache_limiter ' ]);
54
54
}
55
- if (isset ($ settings [" cache_expire " ])) {
56
- $ config ->setCacheExpire ((int ) $ settings [" cache_expire " ]);
55
+ if (isset ($ settings [' cache_expire ' ])) {
56
+ $ config ->setCacheExpire ((int ) $ settings [' cache_expire ' ]);
57
57
}
58
58
59
- if (isset ($ settings [" gc_probability " ])) {
60
- $ config ->setGcProbability ((int ) $ settings [" gc_probability " ]);
59
+ if (isset ($ settings [' gc_probability ' ])) {
60
+ $ config ->setGcProbability ((int ) $ settings [' gc_probability ' ]);
61
61
}
62
62
63
- if (isset ($ settings [" gc_divisor " ])) {
64
- $ config ->setGcDivisor ((int ) $ settings [" gc_divisor " ]);
63
+ if (isset ($ settings [' gc_divisor ' ])) {
64
+ $ config ->setGcDivisor ((int ) $ settings [' gc_divisor ' ]);
65
65
}
66
66
67
- if (isset ($ settings [" gc_maxlifetime " ])) {
68
- $ config ->setGcMaxLifetime ((int ) $ settings [" gc_maxlifetime " ]);
67
+ if (isset ($ settings [' gc_maxlifetime ' ])) {
68
+ $ config ->setGcMaxLifetime ((int ) $ settings [' gc_maxlifetime ' ]);
69
69
}
70
70
71
- if (isset ($ settings [" sid_length " ])) {
72
- $ config ->setSidLength ((int ) $ settings [" sid_length " ]);
71
+ if (isset ($ settings [' sid_length ' ])) {
72
+ $ config ->setSidLength ((int ) $ settings [' sid_length ' ]);
73
73
}
74
74
75
- if (isset ($ settings [" sid_bits_per_character " ])) {
76
- $ config ->setSidBitsPerCharacter ((int ) $ settings [" sid_bits_per_character " ]);
75
+ if (isset ($ settings [' sid_bits_per_character ' ])) {
76
+ $ config ->setSidBitsPerCharacter ((int ) $ settings [' sid_bits_per_character ' ]);
77
77
}
78
78
79
- if (isset ($ settings [" lazy_write " ])) {
80
- $ config ->setLazyWrite ((bool ) $ settings [" lazy_write " ]);
79
+ if (isset ($ settings [' lazy_write ' ])) {
80
+ $ config ->setLazyWrite ((bool ) $ settings [' lazy_write ' ]);
81
81
}
82
82
83
83
return $ config ;
@@ -88,29 +88,29 @@ public function configFromSystem(): Config
88
88
$ config = new Config ();
89
89
90
90
$ config ->setSerializeHandler (
91
- Serializers \Factory::auto (ini_get (" session.serialize_handler " ))
91
+ Serializers \Factory::auto (ini_get (' session.serialize_handler ' ))
92
92
);
93
93
94
- $ config ->setName (ini_get (" session.name " ));
94
+ $ config ->setName (ini_get (' session.name ' ));
95
95
96
- $ config ->setCookieLifetime ((int ) ini_get (" session.cookie_lifetime " ));
97
- $ config ->setCookiePath (ini_get (" session.cookie_path " ));
98
- $ config ->setCookieDomain (ini_get (" session.cookie_domain " ));
99
- $ config ->setCookieSecure ((bool ) ini_get (" session.cookie_secure " ));
100
- $ config ->setCookieHttpOnly ((bool ) ini_get (" session.cookie_httponly " ));
101
- $ config ->setCookieSameSite (ini_get (" session.cookie_samesite " ));
96
+ $ config ->setCookieLifetime ((int ) ini_get (' session.cookie_lifetime ' ));
97
+ $ config ->setCookiePath (ini_get (' session.cookie_path ' ));
98
+ $ config ->setCookieDomain (ini_get (' session.cookie_domain ' ));
99
+ $ config ->setCookieSecure ((bool ) ini_get (' session.cookie_secure ' ));
100
+ $ config ->setCookieHttpOnly ((bool ) ini_get (' session.cookie_httponly ' ));
101
+ $ config ->setCookieSameSite (ini_get (' session.cookie_samesite ' ));
102
102
103
- $ config ->setCacheLimiter (ini_get (" session.cache_limiter " ));
104
- $ config ->setCacheExpire ((int ) ini_get (" session.cache_expire " ));
103
+ $ config ->setCacheLimiter (ini_get (' session.cache_limiter ' ));
104
+ $ config ->setCacheExpire ((int ) ini_get (' session.cache_expire ' ));
105
105
106
- $ config ->setGcProbability ((int ) ini_get (" session.gc_probability " ));
107
- $ config ->setGcDivisor ((int ) ini_get (" session.gc_divisor " ));
108
- $ config ->setGcMaxLifetime ((int ) ini_get (" session.gc_maxlifetime " ));
106
+ $ config ->setGcProbability ((int ) ini_get (' session.gc_probability ' ));
107
+ $ config ->setGcDivisor ((int ) ini_get (' session.gc_divisor ' ));
108
+ $ config ->setGcMaxLifetime ((int ) ini_get (' session.gc_maxlifetime ' ));
109
109
110
- $ config ->setSidLength ((int ) ini_get (" session.sid_length " ));
111
- $ config ->setSidBitsPerCharacter ((int ) ini_get (" session.sid_bits_per_character " ));
110
+ $ config ->setSidLength ((int ) ini_get (' session.sid_length ' ));
111
+ $ config ->setSidBitsPerCharacter ((int ) ini_get (' session.sid_bits_per_character ' ));
112
112
113
- $ config ->setLazyWrite ((bool ) ini_get (" session.lazy_write " ));
113
+ $ config ->setLazyWrite ((bool ) ini_get (' session.lazy_write ' ));
114
114
115
115
return $ config ;
116
116
}
0 commit comments