__construct() __construct(array $config = array()) Constructor. Parameters array $config The configuration to use for this engine It requires the key 'config' which is the name of the Cache config to use for storing the session Throws \InvalidArgumentException if the 'config' key is not provided
open() open(string $savePath, string $name) : boolean Method called on open of a database session. Parameters string $savePath The path where to store/retrieve the session. string $name The session name. Returns boolean — Success
read() read(string|integer $id) : string Method used to read from a cache session. Parameters string|integer $id ID that uniquely identifies session in cache. Returns string — Session data or empty string if it does not exist.
write() write(string|integer $id, mixed $data) : boolean Helper function called on write for cache sessions. Parameters string|integer $id ID that uniquely identifies session in cache. mixed $data The data to be saved. Returns boolean — True for successful write, false otherwise.
destroy() destroy(string|integer $id) : boolean Method called on the destruction of a cache session. Parameters string|integer $id ID that uniquely identifies session in cache. Returns boolean — Always true.
gc() gc(integer $maxlifetime) : boolean Helper function called on gc for cache sessions. Parameters integer $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed. Returns boolean — Always true.