$_tableLocator
$_tableLocator : \Cake\ORM\Locator\LocatorInterface
Table locator instance
DatabaseSession provides methods to be used with Session.
$_tableLocator : \Cake\ORM\Locator\LocatorInterface
Table locator instance
$_table : \Cake\ORM\Table
Reference to the table handling the session data
tableLocator(\Cake\ORM\Locator\LocatorInterface|null $tableLocator = null) : \Cake\ORM\Locator\LocatorInterface
Sets the table locator.
If no parameters are passed, it will return the currently used locator.
| \Cake\ORM\Locator\LocatorInterface|null | $tableLocator | LocatorInterface instance. |
setTableLocator(\Cake\ORM\Locator\LocatorInterface $tableLocator) : $this
Sets the table locator.
| \Cake\ORM\Locator\LocatorInterface | $tableLocator | LocatorInterface instance. |
| None found |
getTableLocator() : \Cake\ORM\Locator\LocatorInterface
Gets the table locator.
| None found |
__construct(array $config = array())
Constructor. Looks at Session configuration information and sets up the session model.
| array | $config | The configuration for this engine. It requires the 'model' key to be present corresponding to the Table to use for managing the sessions. |
| None found |
setTimeout(integer $timeout) : $this
Set the timeout value for sessions.
Primarily used in testing.
| integer | $timeout | The timeout duration. |
| None found |
open(string $savePath, string $name) : boolean
Method called on open of a database session.
| string | $savePath | The path where to store/retrieve the session. |
| string | $name | The session name. |
Success
| None found |
| None found |
read(string|integer $id) : string
Method used to read from a database session.
| string|integer | $id | ID that uniquely identifies session in database. |
Session data or empty string if it does not exist.
| None found |
write(string|integer $id, mixed $data) : boolean
Helper function called on write for database sessions.
| string|integer | $id | ID that uniquely identifies session in database. |
| mixed | $data | The data to be saved. |
True for successful write, false otherwise.
| None found |
destroy(string|integer $id) : boolean
Method called on the destruction of a database session.
| string|integer | $id | ID that uniquely identifies session in database. |
True for successful delete, false otherwise.
| None found |
gc(integer $maxlifetime) : boolean
Helper function called on gc for database sessions.
| integer | $maxlifetime | Sessions that have not updated for the last maxlifetime seconds will be removed. |
True on success, false on failure.
| None found |