php-cooper-config

Secret
in package

FinalYes

A map entry's value whose key `Writer` marks secret (CASC.md ยง4.3): `*password = "..."`, or `*database { ... }` for a block, every value in which then loads as a secret. The value itself is written as if it were not wrapped -- a scalar, a `Raw`, a list, a block.

It composes with Commented in either order: new Secret(new Commented($value, '...')) and new Commented(new Secret($value), '...') both write the comment above a *key line.

Only a map entry can carry one: the * marks a key, and a list's elements have none, so Writer refuses a Secret there. A map that is a list element is different -- its entries have keys, so [new MapValue(['password' => new Secret('x')])] writes [{ *password = "x" }].

Table of Contents

Properties

$value  : mixed

Methods

__construct()  : mixed

Properties

$value read-only

public mixed $value

Methods

__construct()

public __construct(mixed $value) : mixed
Parameters
$value : mixed

the entry's value, written as if it were not wrapped

On this page

Search results