XMF Cookbook
  • Introduction
  • XMF Cookbook
  • Basic Ingredients
    • Namespaces
    • Autoloading
    • Debugging
    • Forward Compatibility
  • Recipes
    • Introducing Module Helpers
    • Using the Permission Helper
      • Checking Permissions
      • Managing Item Permissions
    • Using the Session Helper
    • Using JSON Web Tokens
    • Altering Database Tables
    • Migrating a Module's Database
    • Loading Initial Data
    • Module Admin Pages
      • Hide and Seek with Icons
      • Standard Admin Pages
    • Manage Metadata
    • Highlighting Content
  • Reference
    • Assert
      • Assertions
    • Database
      • Migrate
      • TableLoad
      • Tables
        • Getting Started
        • Table Operations
        • Working with Columns
        • Working with Indexes
        • Changing Table Data
        • Interacting with the Work Queue
        • Error Info and Debugging
    • Debug
    • FilterInput
    • Highlighter
    • IPAddress
    • Jwt
      • JsonWebToken
      • KeyFactory
      • TokenFactory
      • TokenReader
    • Key
      • ArrayStorage
      • Basic
      • FileStorage
      • KeyAbstract
      • StorageInterface
    • Language
    • Metagen
      • Extracting Data
      • Applying Data
    • Module
      • Admin
      • Helper
      • Helper
        • AbstractHelper
        • Cache
        • GenericHelper
        • Permission
        • Session
    • ProxyCheck
    • Random
    • Request
    • StopWords
    • Uuid
    • Yaml
  • Credits
  • License:
  • Table of Content
Powered by GitBook
On this page
  • new Session($dirname)
  • set($name, $value)
  • get($name, $default)
  • del($name)
  • destroy()
  1. Reference
  2. Module
  3. Helper

Session

PreviousPermissionNextProxyCheck

Last updated 7 years ago

The Xmf\Module\Helper\Session class is a module aware helper for using the session storage for module related data. This helper isolates the module related data by applying a module specific prefix to each key.

Xmf\Module\Helper\Session extends .

new Session($dirname)

Creates the session helper for the module specified by name as $dirname. If the string $dirname is empty, the current module in XOOPS will be used.

set($name, $value)

Sets a the session variable named $name to the value $value.

get($name, $default)

Returns the session variable named $name. If the named variable does not exist, it returns $default, or false if $default was not specified.

del($name)

Deletes the session variable named $name.

destroy()

Delete all session variables named by our module.

Xmf\Module\Helper\AbstractHelper