-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced usage of SessionStorage with an interface
- Loading branch information
1 parent
53710f8
commit 6aee68c
Showing
4 changed files
with
63 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/* | ||
* IconCaptcha - Copyright 2023, Fabian Wennink (https://www.fabianwennink.nl) | ||
* Licensed under the MIT license: https://www.fabianwennink.nl/projects/IconCaptcha/license | ||
* | ||
* The above copyright notice and license shall be included in all copies or substantial portions of the software. | ||
*/ | ||
|
||
namespace IconCaptcha\Storage\Session; | ||
|
||
interface SessionStorageInterface | ||
{ | ||
/** | ||
* Reads a value from the session storage. | ||
* | ||
* @param string $key The key of the value to read. Dot notation is supported. | ||
* @return mixed|null The value if it exists, or null if it does not exist. | ||
*/ | ||
public function read(string $key); | ||
|
||
/** | ||
* Writes a value to the session storage. | ||
* | ||
* @param string $key The key to write the value to. Dot notation is supported. | ||
* @param mixed $value The value to write to the session. | ||
*/ | ||
public function write(string $key, $value): void; | ||
|
||
/** | ||
* Removes a value from the session storage. | ||
* | ||
* @param string $key The key of the value to remove. Dot notation is supported. | ||
*/ | ||
public function remove(string $key): void; | ||
|
||
/** | ||
* Checks if a value exists in the session storage. | ||
* | ||
* @param string $key The key to check for. Dot notation is supported. | ||
*/ | ||
public function exists(string $key): bool; | ||
} |