Auth0-PHP

Psr14Store
in package
implements StoreInterface

FinalYes

This class allows host applications to build custom session storage methods through PSR-14 event hooks.

Table of Contents

Interfaces

StoreInterface

Properties

$booted  : bool
Track if a bootup event has been sent out yet.
$configuration  : SdkConfiguration
$sessionPrefix  : string

Methods

__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

$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

__destruct()

Dispatch event to notify that the class is being destructed.

public __destruct() : mixed

defer()

Dispatch event to toggle state deferrance.

public defer(bool $deferring) : void
Parameters
$deferring : bool

whether to defer persisting the storage state

delete()

Dispatch event to delete key-value pair.

public delete(string $key) : void
Parameters
$key : string

session key to delete

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

purge()

Dispatch event to clear all key-value pairs.

public purge() : 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

boot()

Dispatch event to alert that a session should be prepared for an incoming request.

private boot() : void
On this page

Search results