Skip to content

Commit 7a1919e

Browse files
committed
Implement session set and session method methods
1 parent fec0037 commit 7a1919e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/Session.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ public function getFlash($key)
4141
return $_SESSION[self::FLASH_KEY][$key]['value'] ?? false;
4242
}
4343

44+
public function set($key, $value)
45+
{
46+
$_SESSION[$key] = $value;
47+
}
48+
49+
public function get($key)
50+
{
51+
return $_SESSION[$key] ?? false;
52+
}
53+
4454
public function __destruct()
4555
{
4656
$this->removeFlashMessages();

0 commit comments

Comments
 (0)