EnvPlaceholderProcessor

class \TYPO3\CMS\Core\Configuration\Processor\Placeholder\EnvPlaceholderProcessor

Can process a string consisting of one or multiple %env(...)% YAML placeholders, and replace them with their evaluated values.

This in contrast to the EnvVariableProcessor, which only evaluates a single ENV value (without the placeholders), and is also utilized for the actual expansion here by means of the PlaceholderProcessorList.

Table of Contents

Constants

PATTERN_PARTS  : mixed = '%[^(%]+?\([\'"]?([^(]*?)[\'"]?\)%|%([^%()]*?)%'

Properties

$processorList  : array

Methods

__construct()  : mixed
canProcess()  : bool
process()  : string
containsPlaceholder()  : bool
Finds possible placeholders.
getParts()  : array
processPlaceholderLine()  : string
The following methods are taken from YamlFileLoader, but adapted for isolated usage and preventing circular dependencies.
processSinglePlaceholder()  : mixed

Constants

PATTERN_PARTS

public mixed PATTERN_PARTS = '%[^(%]+?\([\'"]?([^(]*?)[\'"]?\)%|%([^%()]*?)%'

Properties

$processorList

protected array $processorList = []

Methods

canProcess()

public canProcess(mixed $placeholder) : bool

Parameters

$placeholder : mixed

Return values

bool

process()

public process(string $value) : string

Parameters

$value : string

Return values

string

containsPlaceholder()

Finds possible placeholders.

protected containsPlaceholder(mixed $value) : bool

May find false positives for complexer structures, but they will be sorted later on.

Parameters

$value : mixed

Return values

bool

getParts()

protected getParts(string $placeholders) : array

Parameters

$placeholders : string

Return values

array

processPlaceholderLine()

The following methods are taken from YamlFileLoader, but adapted for isolated usage and preventing circular dependencies.

protected processPlaceholderLine(string $line) : string

Parameters

$line : string

Return values

string

processSinglePlaceholder()

protected processSinglePlaceholder(string $placeholder, string $value) : mixed

Parameters

$placeholder : string
$value : string
On this page