Since: 8.2

final class SensitiveParameterValue (View source)

The SensitiveParameterValue class allows wrapping sensitive values to protect them against accidental exposure.

Values of parameters having the SensitiveParameter attribute will automatically be wrapped inside of a SensitiveParameterValue object within stack traces.

Methods

__construct(mixed $value)

Constructs a new SensitiveParameterValue object

mixed
getValue()

Returns the sensitive value

array
__debugInfo()

Protects the sensitive value against accidental exposure

Details

__construct(mixed $value)

Constructs a new SensitiveParameterValue object

Construct a SensitiveParameterValue holding a sensitive value.

Parameters

mixed $value

An arbitrary value that should be stored inside the SensitiveParameterValue object.

mixed getValue()

Returns the sensitive value

Get the sensitive value.

Return Value

mixed

The sensitive value.

array __debugInfo()

Protects the sensitive value against accidental exposure

Returns an empty array to protect the sensitive value against accidental exposure when using var_dump.

Return Value

array

An empty array.