PHP Interface yii\authclient\StateStorageInterface

Herein 'state' means a named variable, which is persistent between different requests. Note: in order to function correctly state storage should vary depending on application session, e.g. different web users should not share state with the same name.
Since: 2.1
Author: Paul Klimov ([email protected])
Datei anzeigen Open project: yiisoft/yii2-authclient

Public Methods

Method Description
get ( string $key ) : mixed Returns the state variable value with the variable name.
remove ( string $key ) : boolean Removes a state variable.
set ( string $key, mixed $value ) Adds a state variable.

Method Details

get() public method

If the variable does not exist, the $defaultValue will be returned.
public get ( string $key ) : mixed
$key string the variable name
return mixed the variable value, or `null` if the variable does not exist.

remove() public method

Removes a state variable.
public remove ( string $key ) : boolean
$key string the name of the variable to be removed
return boolean success.

set() public method

If the specified name already exists, the old value will be overwritten.
public set ( string $key, mixed $value )
$key string variable name
$value mixed variable value