1 | <?php |
||
46 | class Internal extends Session { |
||
47 | /** |
||
48 | * @param string $name |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | public function __construct(string $name) { |
||
64 | |||
65 | /** |
||
66 | * @param string $key |
||
67 | * @param integer $value |
||
68 | */ |
||
69 | public function set(string $key, $value) { |
||
73 | |||
74 | /** |
||
75 | * @param string $key |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function get(string $key) { |
||
84 | |||
85 | /** |
||
86 | * @param string $key |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function exists(string $key): bool { |
||
92 | |||
93 | /** |
||
94 | * @param string $key |
||
95 | */ |
||
96 | public function remove(string $key) { |
||
101 | |||
102 | public function clear() { |
||
108 | |||
109 | public function close() { |
||
113 | |||
114 | /** |
||
115 | * Wrapper around session_regenerate_id |
||
116 | * |
||
117 | * @param bool $deleteOldSession Whether to delete the old associated session file or not. |
||
118 | * @param bool $updateToken Wheater to update the associated auth token |
||
119 | * @return void |
||
120 | */ |
||
121 | public function regenerateId(bool $deleteOldSession = true, bool $updateToken = false) { |
||
154 | |||
155 | /** |
||
156 | * Wrapper around session_id |
||
157 | * |
||
158 | * @return string |
||
159 | * @throws SessionNotAvailableException |
||
160 | * @since 9.1.0 |
||
161 | */ |
||
162 | public function getId(): string { |
||
169 | |||
170 | /** |
||
171 | * @throws \Exception |
||
172 | */ |
||
173 | public function reopen() { |
||
176 | |||
177 | /** |
||
178 | * @param int $errorNumber |
||
179 | * @param string $errorString |
||
180 | * @throws \ErrorException |
||
181 | */ |
||
182 | public function trapError(int $errorNumber, string $errorString) { |
||
185 | |||
186 | /** |
||
187 | * @throws \Exception |
||
188 | */ |
||
189 | private function validateSession() { |
||
194 | |||
195 | /** |
||
196 | * @param string $functionName the full session_* function name |
||
197 | * @param array $parameters |
||
198 | * @param bool $silence whether to suppress warnings |
||
199 | * @throws \ErrorException via trapError |
||
200 | * @return mixed |
||
201 | */ |
||
202 | private function invoke(string $functionName, array $parameters = [], bool $silence = false) { |
||
213 | } |
||
214 |
If you suppress an error, we recommend checking for the error condition explicitly: