class LockrDrupal7SecretInfo in Lockr 7.3
Hierarchy
- class \LockrDrupal7SecretInfo implements SecretInfoInterface
Expanded class hierarchy of LockrDrupal7SecretInfo
File
- ./
lockr.secret_info.inc, line 5
View source
class LockrDrupal7SecretInfo implements SecretInfoInterface {
private $data;
public function __construct() {
$this->data = variable_get('lockr_secret_info') ?: [];
}
/**
* {@inheritdoc}
*/
public function getSecretInfo($name) {
if (isset($this->data[$name])) {
return $this->data[$name];
}
elseif ($key = key_get_key($name)) {
if (isset($key['key_provider_settings']['encoded'])) {
return [
'wrapping_key' => $key['key_provider_settings']['encoded'],
];
}
}
return [];
}
/**
* {@inheritdoc}
*/
public function setSecretInfo($name, array $info) {
$this->data[$name] = $info;
variable_set('lockr_secret_info', $this->data);
}
/**
* {@inheritdoc}
*/
public function getAllSecretInfo() {
return $this->data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LockrDrupal7SecretInfo:: |
private | property | ||
LockrDrupal7SecretInfo:: |
public | function |
Returns all secret info. Overrides SecretInfoInterface:: |
|
LockrDrupal7SecretInfo:: |
public | function |
Gets secret info for a secret by name. Overrides SecretInfoInterface:: |
|
LockrDrupal7SecretInfo:: |
public | function |
Sets secret info for a secret by name. Overrides SecretInfoInterface:: |
|
LockrDrupal7SecretInfo:: |
public | function |