You are here

public function PrivateFileKeyProvider::deleteKeyValue in Apigee Edge 8

Deletes the value of a key.

Parameters

\Drupal\key\KeyInterface $key: The key whose value will be deleted.

Return value

string TRUE if successful, FALSE if unsuccessful.

Overrides KeyProviderSettableValueInterface::deleteKeyValue

File

src/Plugin/KeyProvider/PrivateFileKeyProvider.php, line 156

Class

PrivateFileKeyProvider
Stores Apigee Edge authentication credentials in a private file.

Namespace

Drupal\apigee_edge\Plugin\KeyProvider

Code

public function deleteKeyValue(KeyInterface $key) {
  try {
    $this
      ->getFileSystem()
      ->delete($this
      ->getFileUri($key));
  } catch (FileException $e) {

    // Do nothing.
  }
}