Neos\Flow\I18n\Formatter\DatetimeFormatter::doFormattingWithParsedFormat PHP Метод

doFormattingWithParsedFormat() защищенный Метод

Format rules defined in $parsedFormat array are used. Localizable literals are replaced with elements from $localizedLiterals array.
protected doFormattingWithParsedFormat ( DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals ) : string
$dateTime DateTimeInterface PHP object representing particular point in time
$parsedFormat array An array describing format (as in $parsedFormats property)
$localizedLiterals array An array with literals to use (as in $localizedLiterals property)
Результат string Formatted date / time
    protected function doFormattingWithParsedFormat(\DateTimeInterface $dateTime, array $parsedFormat, array $localizedLiterals)
    {
        $formattedDateTime = '';
        foreach ($parsedFormat as $subformat) {
            if (is_array($subformat)) {
                // This is just a simple string we use literally
                $formattedDateTime .= $subformat[0];
            } else {
                $formattedDateTime .= $this->doFormattingForSubpattern($dateTime, $subformat, $localizedLiterals);
            }
        }
        return $formattedDateTime;
    }