\BaiduStore

Abstract class of storage engine for user session related data, like state & authorization code for oauth2.0, access token & refresh token for current user.

Summary

Methods
Properties
Constants
__construct()
get()
set()
remove()
removeAll()
No public properties found
No constants found
getKeyForStore()
$supportedKeys
$clientId
N/A
No private methods found
No private properties found
N/A

Properties

$supportedKeys

$supportedKeys : array

Supported variable key name.

Type

array

$clientId

$clientId

Methods

__construct()

__construct(mixed  $clientId) : mixed

Parameters

mixed $clientId

Returns

mixed —

get()

get(string  $key, \mix  $default = false) : \mix

Get the variable value specified by the variable key name for current session user from the storage system.

Parameters

string $key

Variable key name

\mix $default

Default value if the key couldn't be found

Returns

\mix —

Returns the value for the specified key if it exists, otherwise return $default value

set()

set(string  $key, \mix  $value) : bool

Save the variable item specified by the variable key name into the storage system for current session user.

Parameters

string $key

Variable key name

\mix $value

Variable value

Returns

bool —

Returns true if the saving operation is success, otherwise returns false

remove()

remove(string  $key) : bool

Remove the stored variable item specified by the variable key name from the storage system for current session user.

Parameters

string $key

Variable key name

Returns

bool —

Returns true if remove success, otherwise returns false

removeAll()

removeAll() : bool

Remove all the stored variable items for current session user from the storage system.

Returns

bool —

Returns true if remove success, otherwise returns false

getKeyForStore()

getKeyForStore(string  $key) : string

Get the actual key name for current storage engine.

Parameters

string $key

The original key name

Returns

string —