Bluz\Logger\Logger::interpolate PHP Метод

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

Interpolates context values into the message placeholders
protected interpolate ( string $message, array $context = [] ) : string
$message string
$context array
Результат string
    protected function interpolate($message, array $context = [])
    {
        // build a replacement array with braces around the context keys
        $replace = [];
        foreach ($context as $key => $val) {
            $replace['{' . $key . '}'] = $val;
        }
        // interpolate replacement values into the message and return
        return strtr($message, $replace);
    }