SessionHandler
class SessionHandler implements SessionHandlerInterface, SessionIdInterface (View source)
SessionHandler a special class that can be used to expose the current internal PHP session save handler by inheritance. There are six methods which wrap the six internal session save handler callbacks (open, close, read, write, destroy and gc).
By default, this class will wrap whatever internal save handler is set as as defined by the session.save_handler configuration directive which is usually files by default. Other internal session save handlers are provided by PHP extensions such as SQLite (as sqlite), Memcache (as memcache), and Memcached (as memcached).
Methods
Close the session
Return a new session ID
Destroy a session
Cleanup old sessions
Initialize session
Read session data
Write session data
Details
bool
close()
Close the session
string
create_sid()
Return a new session ID
bool
destroy(string $id)
Destroy a session
int|false
gc(int $max_lifetime)
Cleanup old sessions
bool
open(string $path, string $name)
Initialize session
string|false
read(string $id)
Read session data
bool
write(string $id, string $data)
Write session data