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 known implementers
CacheSession, DatabaseSession Package: Cake\Model\Datasource\Session
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Located at Cake/Model/Datasource/Session/CakeSessionHandlerInterface.php
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Located at Cake/Model/Datasource/Session/CakeSessionHandlerInterface.php
Method Detail
destroysource public
destroy( integer $id )
Method called on the destruction of a session.
Parameters
- integer
$id
- ID that uniquely identifies session in database
Returns
boolean
True for successful delete, false otherwise.
gcsource 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
boolean
Success
readsource public
read( string $id )
Method used to read from a session.
Parameters
- string
$id
- The key of the value to read
Returns
mixed
The value of the key or false if it does not exist
writesource 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
boolean
True 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.7/class-CakeSessionHandlerInterface.html