ConfigurationStorageWriter
in package
Class ConfigurationStorageWriter
Table of Contents
- TABLE_NAME = 'gx_configurations'
- $connection : Connection
- $namespace : string
- __construct() : mixed
- StorageWriter constructor.
- delete() : void
- Deletes a configuration from namespace by using the given key.
- deleteAll() : void
- Deletes all configurations from namespace.
- set() : void
- Sets a configuration value.
- keyExists() : bool
Constants
TABLE_NAME
private
mixed
TABLE_NAME
= 'gx_configurations'
Properties
$connection
private
Connection
$connection
$namespace
private
string
$namespace
Methods
__construct()
StorageWriter constructor.
public
__construct(Connection $connection, string $namespace) : mixed
Parameters
- $connection : Connection
- $namespace : string
Return values
mixed —delete()
Deletes a configuration from namespace by using the given key.
public
delete(string $key) : void
Parameters
- $key : string
Tags
Return values
void —deleteAll()
Deletes all configurations from namespace.
public
deleteAll([string|null $prefix = null ]) : void
It is possible to restrict the delete command by providing a prefix.
Parameters
- $prefix : string|null = null
Return values
void —set()
Sets a configuration value.
public
set(string $key, string $value) : void
A new one will be added if the key didnt exist before, otherwise the existing key will be updated.
Parameters
- $key : string
- $value : string
Tags
Return values
void —keyExists()
private
keyExists(string $key) : bool
Parameters
- $key : string