Class MySQLSession
MySQL-based session handler. The ALO_SESSION_CLEANUP constant is not used here as session should be cleaned up by the MySQL event scheduler.
- Alo\Session\AbstractSessionimplementsSessionHandlerInterface
Alo\Session\MySQLSession
Methods summary
public | #__construct(Alo\Db\MySQL & $instance=null) Constructor Parameters- $instance
Alo\Db\MySQL
$instance If a parameter is passed here its instance will be used instead of Alo::$db
ThrowsAuthorOverrides |
public boolean | #destroy(string$sessionID) Destroys a session Parameters- $sessionID
string $sessionID The ID to destroy
Returnsboolean
AuthorOverrides |
public static | #init(Alo\Db\MySQL & $dependcyObject=null) Initialises a MySQLSession Initialises a MySQLSession Parameters- $dependcyObject
Alo\Db\MySQL
$dependcyObject If you don't want to use Alo::$db you can pass a MySQL instance reference here.
Author |
public string | #read(string$sessionID) Read ssession data Parameters- $sessionID
string $sessionID The session id to read data for.
Returnsstring
AuthorLink |
public boolean | #write(string$sessionID,string$sessionData) Write session data Parameters- $sessionID
string $sessionID The session id.- $sessionData
string $sessionData The encoded session data. This data is the result of the PHP internally encoding the $_SESSION superglobal to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.
Returnsboolean
AuthorLink |
close()
,destroySafely()
,gc()
,getToken()
,identityCheck()
,initSession()
,isActive()
,open()
,setID()
Magic methods summary
Properties summary