File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ public function __construct(
4040 }
4141
4242 /**
43- * Create a session instance from handler or return null if session doesn't exist
43+ * Retrieve an existing session instance from handler or return null if session doesn't exist
4444 */
45- public static function make (string $ id , SessionHandlerInterface $ handler ): ?SessionInterface
45+ public static function retrieve (string $ id , SessionHandlerInterface $ handler ): ?SessionInterface
4646 {
4747 $ sessionData = $ handler ->read ($ id );
4848
Original file line number Diff line number Diff line change @@ -98,7 +98,12 @@ public function createSession(string $sessionId): SessionInterface
9898 */
9999 public function getSession (string $ sessionId ): ?SessionInterface
100100 {
101- return Session::make ($ sessionId , $ this ->handler );
101+ return Session::retrieve ($ sessionId , $ this ->handler );
102+ }
103+
104+ public function hasSession (string $ sessionId ): bool
105+ {
106+ return $ this ->getSession ($ sessionId ) !== null ;
102107 }
103108
104109 /**
You can’t perform that action at this time.
0 commit comments