WireSessionHandler class

This is an abstract class for a session handler module to extend from.

It provides the interface and some basic functions. For an example, see: wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the WireSessionHandler class also inherits all the methods and properties of: WireData and Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
WireSessionHandler::attach()
None

Attach this as the session handler

 
WireSessionHandler::close()
bool

Close the session

 
WireSessionHandler::destroy(string $id)
bool

Destroy the session indicated by the given session ID

 
WireSessionHandler::gc(int $seconds)
bool

Garbage collection: remove stale sessions

 
WireSessionHandler::hookSessionInit(HookEvent $event)
None

Hook before Session::init

 
WireSessionHandler::init()
None

Initailize, called when module configuration has been populated

 
WireSessionHandler::open(string $path, string $name)
bool

Open the session

 
WireSessionHandler::read(string $id)
string

Read and return data for session indicated by $id

 
WireSessionHandler::sessionExists()
bool

Does a session currently exist? (i.e. already one started)

 
WireSessionHandler::wired()
None

Initialize the save handler when $modules sets the current instance

 
WireSessionHandler::write(string $id, $data)
bool

Write the given $data for the given session ID

 

Additional methods and properties

In addition to the methods and properties above, WireSessionHandler also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.252