DatabaseSession provides methods to be used with Session.
$_table
protected $_timeout
protected integer
Constructor. Looks at Session configuration information and sets up the session model.
__construct( array $config [] )
Constructor. Looks at Session configuration information and sets up the session model.
$config
optional [] The configuration for this engine. It requires the 'model' key to be present corresponding to the Table to use for managing the sessions.
close( )
Method called on close of a database session.
SessionHandlerInterface::close()
destroy( string|integer $id )
Method called on the destruction of a database session.
$id
SessionHandlerInterface::destroy()
gc( integer $maxlifetime )
Helper function called on gc for database sessions.
$maxlifetime
SessionHandlerInterface::gc()
open( string $savePath , string $name )
Method called on open of a database session.
$savePath
$name
SessionHandlerInterface::open()
read( string|integer $id )
Method used to read from a database session.
$id
SessionHandlerInterface::read()
setTimeout( integer $timeout )
Set the timeout value for sessions.
Primarily used in testing.
$timeout
write( string|integer $id , mixed $data )
Helper function called on write for database sessions.
$id
$data
SessionHandlerInterface::write()
getTableLocator( )
Gets the table locator.
Cake\ORM\Locator\LocatorInterface
setTableLocator( Cake\ORM\Locator\LocatorInterface $tableLocator )
Sets the table locator.
Cake\ORM\Locator\LocatorInterface
$tableLocator
tableLocator( Cake\ORM\Locator\LocatorInterface $tableLocator null )
Sets the table locator. If no parameters are passed, it will return the currently used locator.
Cake\ORM\Locator\LocatorInterface
$tableLocator
optional null Cake\ORM\Locator\LocatorInterface
© 2005–2018 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.
https://api.cakephp.org/3.6/class-Cake.Http.Session.DatabaseSession.html