AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Traversables
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • AbstractCacheSession
  • AbstractSession
  • MemcachedSession
  • MySQLSession
  • RedisSession

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
Extended byAlo\Session\MySQLSession
Namespace:Alo\Session
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/session/mysqlsession.php

Methods summary

public
#__construct(Alo\Db\MySQL& $instance=null)

Constructor

Constructor

Parameters

$instance
Alo\Db\MySQL
$instance If a parameter is passed here its instance will be used instead of Alo::$db

Throws

Alo\Exception\LibraryException
When $instance is not passed and Alo::$db does not contain a MySQL instance

Author

Art <a.molcanovas@gmail.com>

Overrides

Alo\Session\AbstractSession::__construct
public boolean
#destroy(string$sessionID)

Destroys a session

Destroys a session

Parameters

$sessionID
string
$sessionID The ID to destroy

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Overrides

Alo\Session\AbstractSession::destroy
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

Art <a.molcanovas@gmail.com>
public string
#read(string$sessionID)

Read ssession data

Read ssession data

Parameters

$sessionID
string
$sessionID The session id to read data for.

Returns

string

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/sessionhandlerinterface.read.php
public boolean
#write(string$sessionID,string$sessionData)

Write session data

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.

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Link

http://php.net/manual/en/sessionhandlerinterface.write.php

Methods inherited fromAlo\Session\AbstractSession

close(),destroySafely(),gc(),getToken(),identityCheck(),initSession(),isActive(),open(),setID()

Magic methods summary

Properties summary

protectedAlo\Db\MySQL$db
#

Database instance

Database instance

AloFramework documentation API documentation generated byApiGen 2.8.0