PHP Class BaiduStore, thinksns

Author: zhujianting([email protected])
Exibir arquivo Open project: medz/thinksns-4 Class Usage Examples

Protected Properties

Property Type Description
$clientId
$supportedKeys array Supported variable key name.

Public Methods

Method Description
__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.

Protected Methods

Method Description
getKeyForStore ( string $key ) : string Get the actual key name for current storage engine.

Method Details

__construct() public method

public __construct ( $clientId )

get() abstract public method

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
return mix Returns the value for the specified key if it exists, otherwise return $default value

getKeyForStore() protected method

Get the actual key name for current storage engine.
protected getKeyForStore ( string $key ) : string
$key string The original key name
return string

remove() abstract public method

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
return boolean Returns true if remove success, otherwise returns false

removeAll() abstract public method

Remove all the stored variable items for current session user from the storage system.
abstract public removeAll ( ) : boolean
return boolean Returns true if remove success, otherwise returns false

set() abstract public method

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
return boolean Returns true if the saving operation is success, otherwise returns false

Property Details

$clientId protected_oe property

protected $clientId

$supportedKeys protected_oe static_oe property

Supported variable key name.
protected static array $supportedKeys
return array