YamlPlaceholderGuard

A guard for protecting YAML placeholders - keeps existing, but escalates on adding new placeholders

Table of Contents

Properties

$existingConfiguration  : array<string, mixed>
$fragmentSplitter  : StringFragmentSplitter

Methods

__construct()  : mixed
process()  : array<string|int, mixed>
Modifies existing configuration.
protectPlaceholders()  : array<string, mixed>
Detects placeholders that have been introduced and handles* them.

Properties

$existingConfiguration

protected array<string, mixed> $existingConfiguration

Methods

__construct()

public __construct(array<string|int, mixed> $existingConfiguration) : mixed
Parameters
$existingConfiguration : array<string|int, mixed>

process()

Modifies existing configuration.

public process(array<string|int, mixed> $modified) : array<string|int, mixed>
Parameters
$modified : array<string|int, mixed>
Return values
array<string|int, mixed>

protectPlaceholders()

Detects placeholders that have been introduced and handles* them.

protected protectPlaceholders(array<string, mixed> $current, array<string, mixed> $modified[, array<int, string> $steps = [] ]) : array<string, mixed>

(*) currently throws an exception, but could be purged or escaped as well

Parameters
$current : array<string, mixed>
$modified : array<string, mixed>
$steps : array<int, string> = []

configuration keys traversed so far

Tags
throws
YamlPlaceholderException
Return values
array<string, mixed>

sanitized configuration (currently not used, exception thrown before)


        
On this page

Search results