Add has() function to session
This commit is contained in:
parent
00d73dc1a7
commit
3c20195b30
1 changed files with 5 additions and 0 deletions
|
|
@ -127,6 +127,11 @@ class SessionService implements \SessionHandlerInterface
|
|||
return true;
|
||||
}
|
||||
|
||||
public function has(string $key) : bool
|
||||
{
|
||||
return isset($_SESSION[$key]);
|
||||
}
|
||||
|
||||
public function get(string $key)
|
||||
{
|
||||
$this->initSession();
|
||||
|
|
|
|||
Loading…
Reference in a new issue