Psr14Store
in package
implements
StoreInterface
Class Psr14Store This class allows host applications to build custom session storage methods through PSR-14 event hooks.
Interfaces, Classes, Traits and Enums
- StoreInterface
- Interface StoreInterface.
Table of Contents
- $booted : bool
- Track if a bootup event has been sent out yet.
- $configuration : SdkConfiguration
- $sessionPrefix : string
- __construct() : mixed
- Psr14Store constructor.
- __destruct() : mixed
- Dispatch event to notify that the class is being destructed.
- defer() : void
- Dispatch event to toggle state deferrance.
- delete() : void
- Dispatch event to delete key-value pair.
- get() : mixed
- Dispatch event to retrieve the value of a key-value pair.
- purge() : void
- Dispatch event to clear all key-value pairs.
- set() : void
- Dispatch event to set the value of a key-value pair.
- boot() : void
- Dispatch event to alert that a session should be prepared for an incoming request.
Properties
$booted
Track if a bootup event has been sent out yet.
private
bool
$booted
= false
$configuration
private
SdkConfiguration
$configuration
$sessionPrefix
private
string
$sessionPrefix
= 'auth0'
Methods
__construct()
Psr14Store constructor.
public
__construct(SdkConfiguration $configuration[, string $sessionPrefix = 'auth0' ]) : mixed
Parameters
- $configuration : SdkConfiguration
-
Base configuration options for the SDK. See the SdkConfiguration class constructor for options.
- $sessionPrefix : string = 'auth0'
-
a string to prefix session keys with
Return values
mixed —__destruct()
Dispatch event to notify that the class is being destructed.
public
__destruct() : mixed
Return values
mixed —defer()
Dispatch event to toggle state deferrance.
public
defer(bool $deferring) : void
Parameters
- $deferring : bool
-
whether to defer persisting the storage state
Return values
void —delete()
Dispatch event to delete key-value pair.
public
delete(string $key) : void
Parameters
- $key : string
-
session key to delete
Return values
void —get()
Dispatch event to retrieve the value of a key-value pair.
public
get(string $key[, mixed $default = null ]) : mixed
Parameters
- $key : string
-
session key to query
- $default : mixed = null
-
default to return if nothing was found
Return values
mixed —purge()
Dispatch event to clear all key-value pairs.
public
purge() : void
Return values
void —set()
Dispatch event to set the value of a key-value pair.
public
set(string $key, mixed $value) : void
Parameters
- $key : string
-
session key to set
- $value : mixed
-
value to use
Return values
void —boot()
Dispatch event to alert that a session should be prepared for an incoming request.
private
boot() : void