HumHub Documentation (unofficial)

ConfigPostProcessor
in package

Table of Contents

Properties

$exactReplacements  : array<string|int, mixed>
$replacements  : Replacements
$rulesets  : array<string|int, callable>

Methods

__construct()  : mixed
__invoke()  : array<string|int, mixed>
merge()  : array<string|int, mixed>
Merge two arrays together.
fallbackReplacement()  : mixed
Replace a value using the translation table, if the value is a string.
initializeReplacements()  : Replacements
noopReplacement()  : mixed
processConfig()  : array<string|int, mixed>
replace()  : mixed
Perform substitutions as needed on an individual value.
replaceDependencyAliases()  : array<string|int, mixed>
Rewrite dependency aliases array
replaceDependencyConfiguration()  : mixed
replaceDependencyFactories()  : mixed
replaceDependencyInvokables()  : array<string|int, mixed>
Rewrite dependency invokables array
replaceDependencyServices()  : mixed
replaceExactValue()  : mixed
Replace a value matched exactly.
replacementRuleMatch()  : callable

Properties

$exactReplacements

private array<string|int, mixed> $exactReplacements = ['zend-expressive' => 'mezzio', 'zf-apigility' => 'api-tools']

String keys => string values

$replacements

private Replacements $replacements
Tags
psalm-suppress

PropertyNotSetInConstructor Initialized during call to the only public method __invoke()

Methods

__invoke()

public __invoke(array<string|int, mixed> $config[, array<string|int, string> $keys = [] ]) : array<string|int, mixed>
Parameters
$config : array<string|int, mixed>
$keys : array<string|int, string> = []

Hierarchy of keys, for determining location in nested configuration.

Return values
array<string|int, mixed>

merge()

Merge two arrays together.

public static merge(array<string|int, mixed> $a, array<string|int, mixed> $b) : array<string|int, mixed>

If an integer key exists in both arrays, the value from the second array will be appended to the first array. If both values are arrays, they are merged together, else the value of the second array overwrites the one of the first array.

Based on zend-stdlib Zend\Stdlib\ArrayUtils::merge

Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
Tags
copyright

Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)

Return values
array<string|int, mixed>

fallbackReplacement()

Replace a value using the translation table, if the value is a string.

private fallbackReplacement(mixed $value) : mixed
Parameters
$value : mixed

noopReplacement()

private noopReplacement(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

Returns $value verbatim.

processConfig()

private processConfig(array<string|int, mixed> $config[, array<string|int, string> $keys = [] ]) : array<string|int, mixed>
Parameters
$config : array<string|int, mixed>
$keys : array<string|int, string> = []

Hierarchy of keys, for determining location in nested configuration.

Return values
array<string|int, mixed>

replace()

Perform substitutions as needed on an individual value.

private replace(mixed $value, array<string|int, string> $keys[, null|int|string $key = null ]) : mixed

The $key is provided to allow fine-grained selection of rewrite rules.

Parameters
$value : mixed
$keys : array<string|int, string>

Key hierarchy

$key : null|int|string = null

replaceDependencyAliases()

Rewrite dependency aliases array

private replaceDependencyAliases(array<string|int, mixed> $aliases) : array<string|int, mixed>

In this case, we want to keep the alias as-is, but rewrite the target.

We need also provide an additional alias if the alias key is a legacy class.

Parameters
$aliases : array<string|int, mixed>
Return values
array<string|int, mixed>

replaceDependencyConfiguration()

private replaceDependencyConfiguration(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>

replaceDependencyFactories()

private replaceDependencyFactories(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>

replaceDependencyInvokables()

Rewrite dependency invokables array

private replaceDependencyInvokables(array<string|int, mixed> $config) : array<string|int, mixed>

In this case, we want to keep the alias as-is, but rewrite the target.

We need also provide an additional alias if invokable is defined with an alias which is a legacy class.

Parameters
$config : array<string|int, mixed>
Return values
array<string|int, mixed>

replaceDependencyServices()

private replaceDependencyServices(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>

replaceExactValue()

Replace a value matched exactly.

private replaceExactValue(mixed $value) : mixed
Parameters
$value : mixed

replacementRuleMatch()

private replacementRuleMatch(mixed $value[, null|int|string $key = null ]) : callable
Parameters
$value : mixed
$key : null|int|string = null
Return values
callable

Callable to invoke with value


        
On this page

Search results