Interface CakeSessionHandlerInterface
Interface for Session handlers. Custom session handler classes should implement this interface as it allows CakeSession know how to map methods to session_set_save_handler()
Direct Implementers
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Model/Datasource/Session/CakeSessionHandlerInterface.php
Method Summary
-
close() publicMethod called on close of a session.
-
destroy() publicMethod called on the destruction of a session.
-
gc() public
Run the Garbage collection on the session storage. This method should vacuum all expired or dead sessions.
-
open() publicMethod called on open of a session.
-
read() publicMethod used to read from a session.
-
write() publicHelper function called on write for sessions.
Method Detail
destroy()source public
destroy( integer $id )
Method called on the destruction of a session.
Parameters
-
integer
$id
- ID that uniquely identifies session in database
Returns
booleanTrue for successful delete, false otherwise.
gc()source public
gc( integer $expires null )
Run the Garbage collection on the session storage. This method should vacuum all expired or dead sessions.
Parameters
-
integer
$expires
optional null - Timestamp (defaults to current time)
Returns
booleanSuccess
read()source public
read( string $id )
Method used to read from a session.
Parameters
-
string
$id
- The key of the value to read
Returns
mixedThe value of the key or false if it does not exist
write()source public
write( integer $id , mixed $data )
Helper function called on write for sessions.
Parameters
-
integer
$id
- ID that uniquely identifies session in database
-
mixed
$data
- The value of the data to be saved.
Returns
booleanTrue for successful write, false otherwise.
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.8/class-CakeSessionHandlerInterface.html