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

Namespaces

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

Classes

  • AbstractCacheSession
  • AbstractSession
  • MemcachedSession
  • MySQLSession
  • RedisSession

Class AbstractSession

The session interface

Alo\Session\AbstractSessionimplementsSessionHandlerInterface

Direct known subclasses

Alo\Session\AbstractCacheSession,Alo\Session\MySQLSession

Indirect known subclasses

Alo\Session\MemcachedSession,Alo\Session\RedisSession

Abstract
Namespace:Alo\Session
Package:Session
Author:Art <a.molcanovas@gmail.com>
Located atsys/class/alo/session/abstractsession.php

Methods summary

public
#__construct( )

Instantiates the class

Instantiates the class

Author

Art <a.molcanovas@gmail.com>
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

Art <a.molcanovas@gmail.com>
public static boolean
#destroySafely( )

Only calls session_destroy() if a session is active

Only calls session_destroy() if a session is active

Returns

boolean

Author

Art <a.molcanovas@gmail.com>
public static boolean
#isActive( )

Checks whether a session is currently active

Checks whether a session is currently active

Returns

boolean

Author

Art <a.molcanovas@gmail.com>
public boolean
#close( )

Closes the session

Closes the session

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Implementation of

SessionHandlerInterface::close()
public boolean
#gc(integer$maxlifetime)

Cleans old sessions

Cleans old sessions

Parameters

$maxlifetime
integer
$maxlifetime Sessions that have not updated for the last maxlifetime seconds will be removed.

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Implementation of

SessionHandlerInterface::gc()
public boolean
#open(string$savePath,string$sessionID)

Initialize session

Initialize session

Parameters

$savePath
string
$savePath Unused, but required for the interface
$sessionID
string
$sessionID Unused, but required for the interface

Returns

boolean

Author

Art <a.molcanovas@gmail.com>

Link

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

Implementation of

SessionHandlerInterface::open()
public boolean
#identityCheck( )

Checks if the session hasn't been hijacked

Checks if the session hasn't been hijacked

Returns

boolean
TRUE if the check has passed, FALSE if not and the session has been terminated.

Author

Art <a.molcanovas@gmail.com>
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>

Implementation of

SessionHandlerInterface::destroy()
protected static string
#getToken( )

Generates a session token

Generates a session token

Returns

string

Author

Art <a.molcanovas@gmail.com>
protectedAlo\Session\AbstractSession
#setID( )

Sets the session ID variable & the cookie

Sets the session ID variable & the cookie

Returns

Alo\Session\AbstractSession

Author

Art <a.molcanovas@gmail.com>

Methods inherited fromSessionHandlerInterface

read(),write()

Magic methods summary

AloFramework documentation API documentation generated byApiGen 2.8.0