SwooleSession
in package
implements
SessionHandler
Implement session handler
This class provides interfaces for session handling. It is used to register a redis cache based session save handler.
Class override the local php session handler this class handles all system sessions including garbage collection. It is either a plain file system session or, if possible a apc session.
This handler can either use an cookie based handling like php default and a handler based on oauth tokens.
Tags
Interfaces, Classes, Traits and Enums
- SessionHandler
- Define a session handler interface with start and end points
Table of Contents
- $id : string|null
- $is_jwt : bool
- $request : Request|null
- destroy() : bool
- Destroy session Unset session on logout
- End() : void
- read() : array<string|int, mixed>|null
- Read values
- Start() : void
- write() : bool
- Write session
Properties
$id
private
string|null
$id
= null
$is_jwt
private
bool
$is_jwt
= false
$request
private
Request|null
$request
= null
Methods
destroy()
Destroy session Unset session on logout
public
destroy() : bool
Return values
bool —True when delete worked
End()
public
End(Response $response) : void
Parameters
- $response : Response
Return values
void —read()
Read values
public
read() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —Start()
public
Start(Request $request) : void
Parameters
- $request : Request
Return values
void —write()
Write session
public
write(array<string|int, mixed>|null $data) : bool
Parameters
- $data : array<string|int, mixed>|null