CommerceGuys\Addressing\Formatter\DefaultFormatter::renderAttributes PHP Метод

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

Renders the given attributes.
protected renderAttributes ( array $attributes ) : string
$attributes array The attributes.
Результат string The rendered attributes.
    protected function renderAttributes(array $attributes)
    {
        foreach ($attributes as $name => $value) {
            if (is_array($value)) {
                $value = implode(' ', (array) $value);
            }
            $attributes[$name] = $name . '="' . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . '"';
        }
        return implode(' ', $attributes);
    }