W3cubDocs

/Yii 2.0

Interface yii\authclient\StateStorageInterface

Implemented by yii\authclient\SessionStateStorage
Available since version 2.1
Source Code https://github.com/yiisoft/yii2-authclient/blob/master/StateStorageInterface.php

StateStorageInterface is an interface for Auth client state storage.

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.

Public Methods

Method Description Defined By
get() Returns the state variable value with the variable name. yii\authclient\StateStorageInterface
remove() Removes a state variable. yii\authclient\StateStorageInterface
set() Adds a state variable. yii\authclient\StateStorageInterface

Method Details

get() public abstract method

Returns the state variable value with the variable name.

If the variable does not exist, the $defaultValue will be returned.

public abstract mixed get ( $key )
$key string

The variable name

return mixed

The variable value, or null if the variable does not exist.

remove() public abstract method

Removes a state variable.

public abstract boolean remove ( $key )
$key string

The name of the variable to be removed

return boolean

Success.

set() public abstract method

Adds a state variable.

If the specified name already exists, the old value will be overwritten.

public abstract void set ( $key, $value )
$key string

Variable name

$value mixed

Variable value

© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc-2.0/yii-authclient-statestorageinterface.html