PHP Класс BaiduStore, thinksns

Автор: zhujianting([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$clientId
$supportedKeys array Supported variable key name.

Открытые методы

Метод Описание
__construct ( $clientId )
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.
remove ( string $key ) : boolean Remove the stored variable item specified by the variable key name from the storage system for current session user.
removeAll ( ) : boolean Remove all the stored variable items for current session user from the storage system.
set ( string $key, mix $value ) : boolean Save the variable item specified by the variable key name into the storage system for current session user.

Защищенные методы

Метод Описание
getKeyForStore ( string $key ) : string Get the actual key name for current storage engine.

Описание методов

__construct() публичный Метод

public __construct ( $clientId )

get() абстрактный публичный Метод

Get the variable value specified by the variable key name for current session user from the storage system.
abstract public get ( string $key, mix $default = false ) : mix
$key string Variable key name
$default mix Default value if the key couldn't be found
Результат mix Returns the value for the specified key if it exists, otherwise return $default value

getKeyForStore() защищенный Метод

Get the actual key name for current storage engine.
protected getKeyForStore ( string $key ) : string
$key string The original key name
Результат string

remove() абстрактный публичный Метод

Remove the stored variable item specified by the variable key name from the storage system for current session user.
abstract public remove ( string $key ) : boolean
$key string Variable key name
Результат boolean Returns true if remove success, otherwise returns false

removeAll() абстрактный публичный Метод

Remove all the stored variable items for current session user from the storage system.
abstract public removeAll ( ) : boolean
Результат boolean Returns true if remove success, otherwise returns false

set() абстрактный публичный Метод

Save the variable item specified by the variable key name into the storage system for current session user.
abstract public set ( string $key, mix $value ) : boolean
$key string Variable key name
$value mix Variable value
Результат boolean Returns true if the saving operation is success, otherwise returns false

Описание свойств

$clientId защищенное свойство

protected $clientId

$supportedKeys защищенное статическое свойство

Supported variable key name.
protected static array $supportedKeys
Результат array