A FileStore represents a store pull for save data

package Ant\ChateaClient\Service\Client
see

 Methods

Initializes a new instance of this class.

__construct(array $config) 

Parameters

$config

array

Associative array can configure the File store. The parameters are: file_directory The directory where save the file file_name The name of file of data SIGNED_ALGORITHM The algorithn used for signed data.

Clear all data from the persistent storage

clearAllPersistentData() : void

Clear the data with $key from the persistent storage

clearPersistentData(string $key) : void

Parameters

$key

string

Get the data for $key, persisted by Client::setPersistentData()

getPersistentData(string $key, boolean $default) : mixed

Parameters

$key

string

The key of the data to retrieve

$default

boolean

The default value to return if $key is not found

Returns

mixed

Stores the given ($key, $value) pair, so that future calls to getPersistentData($key) return $value. This call may be in another request.

setPersistentData(string $key, array $value) : void

Parameters

$key

string

$value

array

Exceptions

\Ant\ChateaClient\Service\Client\AuthenticationException

Get all data in file.

getDataInFile() : array

Returns

arrayAssociative array with all data of file

Save data in file.

saveInFile(string $content) 

Parameters

$content

string

The data to save

 Properties

 

array|\Guzzle\Common\Collection $config Configuration data

$config 
 

This store only support this type data to save

$kSupportedKeys : array
Static

 Constants

 

The algorithn used for signed data

SIGNED_ALGORITHM