0 follower

Class Yiisoft\Yii\AuthClient\StateStorage\SessionStateStorage

InheritanceYiisoft\Yii\AuthClient\StateStorage\SessionStateStorage
ImplementsYiisoft\Yii\AuthClient\StateStorage\StateStorageInterface

SessionStateStorage provides Auth client state storage based on web session.

See also:

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( \Yiisoft\Session\SessionInterface $session )
$session \Yiisoft\Session\SessionInterface

                public function __construct(
    /**
     * @var SessionInterface session object to be used.
     *
     * After the SessionStateStorage object is created, if you want to change this property,
     * you should only assign it with a session object.
     *
     * If not set - application 'session' component will be used, but only, if it is available (e.g. in web application),
     * otherwise - no session will be used and no data saving will be performed.
     */
    private readonly SessionInterface $session
) {
}

            
get() public method

public mixed get ( string $key )
$key string

                #[\Override]
public function get(string $key): mixed
{
    return $this->session->get($key);
}

            
remove() public method

public void remove ( string $key )
$key string

                #[\Override]
public function remove(string $key): void
{
    $this->session->remove($key);
}

            
set() public method

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

                #[\Override]
public function set(string $key, $value): void
{
    $this->session->set($key, $value);
}