Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Fingerprint
  • Handler
  • Manager
  • RememberMe
  • SessionUser

Interfaces

  • FingerprintInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Manager

Session management

Credits due to Robert Hafner's article "How to Create Bulletproof Sessions" see: http://blog.teamtreehouse.com/how-to-create-bulletproof-sessions

Xoops\Core\Session\Manager implements Xoops\Core\AttributeInterface
Namespace: Xoops\Core\Session
Package: Manager
Category: Xoops\Core\Session
Copyright: 2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at oops_lib/Xoops/Core/Session/Manager.php
Methods summary
public
# __construct( )

establish access to other classes we will use

establish access to other classes we will use

public
# sessionStart( )

Configure and start the session

Configure and start the session

public
# clearSession( )

Clear the current session and reset fingerprint

Clear the current session and reset fingerprint

public
# expireSession( )

Expire the current session and replace with a fresh one.

Expire the current session and replace with a fresh one.

public
# regenerateSession( )

Generate a new id and delete the old session.

Generate a new id and delete the old session.

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

protected boolean
# validateSession( )

Validate that the session has not expired.

Validate that the session has not expired.

Returns

boolean
true is session is valid and not expired, otherwise false
public Xoops\Core\Session\SessionUser
# user( )

Get the user object used by this session.

Get the user object used by this session.

Returns

Xoops\Core\Session\SessionUser
public
# sessionShutdown( )

shutdown function

shutdown function

public mixed
# get( string $name, mixed $default = null )

Retrieve a session variable value.

Retrieve a session variable value.

Parameters

$name
Name of an session variable
$default

A 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.

Implementation of

Xoops\Core\AttributeInterface::get()
public
# set( string $name, mixed $value )

Set an attribute value.

Set an attribute value.

Parameters

$name
Name of the attribute option
$value
Value of the attribute option

Implementation of

Xoops\Core\AttributeInterface::set()
public boolean
# has( string $name )

Determine if an attribute exists.

Determine if an attribute exists.

Parameters

$name
An attribute name.

Returns

boolean
TRUE if the given attribute exists, otherwise FALSE.

Implementation of

Xoops\Core\AttributeInterface::has()
public mixed
# remove( string $name )

Remove an attribute.

Remove an attribute.

Parameters

$name
An attribute name.

Returns

mixed

An attribute value, if the named attribute existed and has been removed, otherwise NULL.

Implementation of

Xoops\Core\AttributeInterface::remove()
public array
# clear( )

Remove all attributes.

Remove all attributes.

Returns

array
old values

Implementation of

Xoops\Core\AttributeInterface::clear()
Properties summary
protected Xoops $xoops
# null
protected Xoops\Core\HttpRequest $httpRequest
# null
protected Xoops\Core\Session\Fingerprint $fingerprint

fingerprint object

fingerprint object

# null
protected Xoops\Core\Session\SessionUser $sessionUser

session user object

session user object

# null
API documentation generated by ApiGen