KMP PHP API Reference

EnvVarSecretStore
in package
implements SecretStoreInterface

Table of Contents

Interfaces

SecretStoreInterface

Properties

$prefix  : string

Methods

__construct()  : mixed
Constructor.
delete()  : void
Delete operations are unsupported for environment variables.
exists()  : bool
Return true if a secret name exists without revealing or decrypting its value.
get()  : SensitiveString|null
Fetch a secret value.
list()  : array<int, string>
put()  : void
Write operations are unsupported for environment variables.
rotatedAt()  : DateTimeImmutable|null
Return when a secret was last rotated, if known, without revealing the value.
envName()  : string
Convert a logical secret name to its environment variable name.

Properties

Methods

__construct()

Constructor.

public __construct([string $prefix = 'KMP_SECRET_' ]) : mixed
Parameters
$prefix : string = 'KMP_SECRET_'

Environment variable prefix

delete()

Delete operations are unsupported for environment variables.

public delete(string $name) : void
Parameters
$name : string

Secret name

exists()

Return true if a secret name exists without revealing or decrypting its value.

public exists(string $name) : bool
Parameters
$name : string
Tags
inheritDoc
Return values
bool

list()

public list([string $prefix = '' ]) : array<int, string>
Parameters
$prefix : string = ''
Tags
inheritDoc
Return values
array<int, string>

Secret names only; never values.

rotatedAt()

Return when a secret was last rotated, if known, without revealing the value.

public rotatedAt(string $name) : DateTimeImmutable|null
Parameters
$name : string

Secret name

Tags
inheritDoc
Return values
DateTimeImmutable|null

envName()

Convert a logical secret name to its environment variable name.

private envName(string $name) : string
Parameters
$name : string

Secret name

Return values
string
On this page

Search results