XOOPS  2.6.0
Xoops\Core\Session\Manager Class Reference
Inheritance diagram for Xoops\Core\Session\Manager:
Inheritance graph

Public Member Functions

 __construct ()
 
 clear ()
 
 clearSession ()
 
 expireSession ()
 
 get ($name, $default=null)
 
 has ($name)
 
 regenerateSession ()
 
 remove ($name)
 
 sessionStart ()
 
 set ($name, $value)
 
 user ()
 

Protected Member Functions

 validateSession ()
 

Protected Attributes

 $fingerprint = null
 
 $httpRequest = null
 
 $sessionUser = null
 
 $xoops = null
 

Detailed Description

Definition at line 30 of file Manager.php.

Constructor & Destructor Documentation

Xoops\Core\Session\Manager::__construct ( )

establish access to other classes we will use

Definition at line 55 of file Manager.php.

References Xoops\getInstance(), and Xoops\Core\HttpRequest\getInstance().

Here is the call graph for this function:

Member Function Documentation

Xoops\Core\Session\Manager::clear ( )

Remove all attributes.

Returns
array old values

Implements Xoops\Core\AttributeInterface.

Definition at line 279 of file Manager.php.

References $_SESSION.

Referenced by Xoops\Core\Session\Manager\clearSession().

Here is the caller graph for this function:

Xoops\Core\Session\Manager::clearSession ( )

Clear the current session and reset fingerprint

Returns
void

Definition at line 136 of file Manager.php.

References Xoops\Core\Session\Manager\clear(), and Xoops\Core\Session\Manager\regenerateSession().

Referenced by Xoops\Core\Session\Manager\sessionStart().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Session\Manager::expireSession ( )

Expire the current session and replace with a fresh one.

Returns
void

Definition at line 148 of file Manager.php.

References Xoops\Core\Session\Manager\has(), and Xoops\Core\Session\Manager\set().

Referenced by Xoops\Core\Session\Manager\sessionStart().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Session\Manager::get (   $name,
  $default = null 
)

Retrieve a session variable value.

Parameters
string$nameName of an session variable
mixed$defaultA default value returned if the requested named session variable is not set.
Returns
mixed The value of the session variable, or $default if not set.

Implements Xoops\Core\AttributeInterface.

Definition at line 228 of file Manager.php.

References $_SESSION, and $name.

Xoops\Core\Session\Manager::has (   $name)

Determine if an attribute exists.

Parameters
string$nameAn attribute name.
Returns
boolean TRUE if the given attribute exists, otherwise FALSE.

Implements Xoops\Core\AttributeInterface.

Definition at line 253 of file Manager.php.

References $_SESSION, and $name.

Referenced by Xoops\Core\Session\Manager\expireSession(), and Xoops\Core\Session\Manager\validateSession().

Here is the caller graph for this function:

Xoops\Core\Session\Manager::regenerateSession ( )

Generate a new id and delete the old session.

This should be called whenever permission levels for a user change.

Returns
void

Definition at line 182 of file Manager.php.

Referenced by Xoops\Core\Session\Manager\clearSession(), and Xoops\Core\Session\Manager\sessionStart().

Here is the caller graph for this function:

Xoops\Core\Session\Manager::remove (   $name)

Remove an attribute.

Parameters
string$nameAn attribute name.
Returns
mixed An attribute value, if the named attribute existed and has been removed, otherwise NULL.

Implements Xoops\Core\AttributeInterface.

Definition at line 266 of file Manager.php.

References $_SESSION, and $name.

Xoops\Core\Session\Manager::sessionStart ( )

Configure and start the session

Returns
void

Revisit this once basics are working

grab session_id from https login form

if ($xoops->getConfig('use_ssl') && isset($_POST[$xoops->getConfig('sslpost_name')]) && $_POST[$xoops->getConfig('sslpost_name')] != '' ) { session_id($_POST[$xoops->getConfig('sslpost_name')]); } else { set session_name...}

Definition at line 68 of file Manager.php.

References $_SESSION, $name, $path, Xoops\Core\Session\Manager\clearSession(), Xoops\Core\Session\Manager\expireSession(), XoopsBaseConfig\get(), Xoops\Core\Session\Manager\regenerateSession(), and Xoops\Core\Session\Manager\validateSession().

Here is the call graph for this function:

Xoops\Core\Session\Manager::set (   $name,
  $value 
)

Set an attribute value.

Parameters
string$nameName of the attribute option
mixed$valueValue of the attribute option
Returns
void

Implements Xoops\Core\AttributeInterface.

Definition at line 241 of file Manager.php.

References $_SESSION, and $name.

Referenced by Xoops\Core\Session\Manager\expireSession().

Here is the caller graph for this function:

Xoops\Core\Session\Manager::user ( )

Get the user object used by this session.

Returns
SessionUser

Definition at line 212 of file Manager.php.

References Xoops\Core\Session\Manager\$sessionUser.

Xoops\Core\Session\Manager::validateSession ( )
protected

Validate that the session has not expired.

Returns
boolean true is session is valid and not expired, otherwise false

Definition at line 192 of file Manager.php.

References Xoops\Core\Session\Manager\has().

Referenced by Xoops\Core\Session\Manager\sessionStart().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Xoops\Core\Session\Manager::$fingerprint = null
protected

Definition at line 45 of file Manager.php.

Xoops\Core\Session\Manager::$httpRequest = null
protected

Definition at line 40 of file Manager.php.

Xoops\Core\Session\Manager::$sessionUser = null
protected

Definition at line 50 of file Manager.php.

Referenced by Xoops\Core\Session\Manager\user().

Xoops\Core\Session\Manager::$xoops = null
protected

Definition at line 35 of file Manager.php.


The documentation for this class was generated from the following file: