Class AbstractSession
- Alo\Session\AbstractSessionimplementsSessionHandlerInterface
Methods summary
public | |
protected static | #initSession(Alo\Db\MySQL |Alo\Cache\AbstractCache & $dependcyObject=null,string$handler= ALO_SESSION_HANDLER) Performs the internal steps of initialising a session Performs the internal steps of initialising a session Parameters- $dependcyObject
Alo\Db\MySQL |Alo\Cache\AbstractCache
$dependcyObject Session handlers have a dependency, e.g. a MySQL instance for MySQLSession, a RedisWrapper instance for RedisSession etc. You can provide an object reference containing such an instance here, otherwise Alo::$db/Alo::$cache will be used.- $handler
string $handler If you want to test a session with a different handler you can overwrite it here by passing a class name
Author |
public static boolean | #destroySafely( ) Only calls session_destroy() if a session is active Only calls session_destroy() if a session is active Returnsboolean
Author |
public static boolean | #isActive( ) Checks whether a session is currently active Checks whether a session is currently active Returnsboolean
Author |
public boolean | #close( ) Closes the session Returnsboolean
AuthorImplementation of |
public boolean | #gc(integer$maxlifetime) Cleans old sessions Parameters- $maxlifetime
integer $maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.
Returnsboolean
AuthorImplementation of |
public boolean | #open(string$savePath,string$sessionID) Initialize session Parameters- $savePath
string $savePath Unused, but required for the interface- $sessionID
string $sessionID Unused, but required for the interface
Returnsboolean
AuthorLinkImplementation of |
public boolean | #identityCheck( ) Checks if the session hasn't been hijacked Checks if the session hasn't been hijacked Returnsboolean TRUE if the check has passed, FALSE if not and the session has been terminated.
Author |
public boolean | #destroy(string$sessionID) Destroys a session Parameters- $sessionID
string $sessionID The ID to destroy
Returnsboolean
AuthorImplementation of |
protected static string | #getToken( ) Generates a session token Generates a session token Returnsstring
Author |
protectedAlo\Session\AbstractSession | #setID( ) Sets the session ID variable & the cookie Sets the session ID variable & the cookie ReturnsAuthor |
read()
,write()
Magic methods summary