[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/session/src/Storage/ -> NativeStorage.php (summary)

Part of the Joomla Framework Session Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 487 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

NativeStorage:: (21 methods):
  __construct()
  all()
  clear()
  close()
  gc()
  abort()
  get()
  getHandler()
  getId()
  getName()
  has()
  isActive()
  isStarted()
  remove()
  regenerate()
  set()
  setHandler()
  setId()
  setName()
  setOptions()
  start()


Class: NativeStorage  - X-Ref

Base class providing a session store

__construct(?\SessionHandlerInterface $handler = null, array $options = [])   X-Ref
Constructor

param: \SessionHandlerInterface  $handler  Session save handler
param: array                     $options  Session options

all()   X-Ref
Retrieves all variables from the session store

return: array

clear()   X-Ref
Clears all variables from the session store

return: void

close()   X-Ref
Writes session data and ends session

return: void

gc()   X-Ref
Perform session data garbage collection

return: integer|boolean  Number of deleted sessions on success or boolean false on failure or if the function is unsupported

abort()   X-Ref
Aborts the current session

return: boolean

get(string $name, $default)   X-Ref
Get data from the session store

param: string  $name     Name of a variable
param: mixed   $default  Default value of a variable if not set
return: mixed  Value of a variable

getHandler()   X-Ref
Gets the save handler instance

return: \SessionHandlerInterface|null

getId()   X-Ref
Get the session ID

return: string  The session ID

getName()   X-Ref
Get the session name

return: string  The session name

has(string $name)   X-Ref
Check whether data exists in the session store

param: string  $name  Name of variable
return: boolean

isActive()   X-Ref
Check if the session is active

return: boolean

isStarted()   X-Ref
Check if the session is started

return: boolean

remove(string $name)   X-Ref
Unset a variable from the session store

param: string  $name  Name of variable
return: mixed  The value from session or NULL if not set

regenerate(bool $destroy = false)   X-Ref
Regenerates the session ID that represents this storage.

This method must invoke session_regenerate_id($destroy) unless this interface is used for a storage object designed for unit
or functional testing where a real PHP session would interfere with testing.

param: boolean  $destroy  Destroy session when regenerating?
return: boolean  True on success

set(string $name, $value = null)   X-Ref
Set data into the session store

param: string  $name   Name of a variable
param: mixed   $value  Value of a variable
return: mixed  Old value of a variable

setHandler(?\SessionHandlerInterface $handler = null)   X-Ref
Registers session save handler as a PHP session handler

param: \SessionHandlerInterface  $handler  The save handler to use
return: $this

setId(string $id)   X-Ref
Set the session ID

param: string  $id  The session ID
return: $this

setName(string $name)   X-Ref
Set the session name

param: string  $name  The session name
return: $this

setOptions(array $options)   X-Ref
Sets session.* ini variables.

For convenience we omit 'session.' from the beginning of the keys.
Explicitly ignores other ini keys.

param: array  $options  Session ini directives array(key => value).
return: $this

start()   X-Ref
Start a session

return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer