src/Writing/SVGWriter.php
private function appendStyles(array $styles)
    {
        if (empty($styles)) {
            return;
        }

        $string = '';
        $prependSemicolon = false;
        foreach ($styles as $key => $value) {
            if ($prependSemicolon) {
                $string .= '; ';
            }
            $prependSemicolon = true;
            $string .= $key.': '.$value;
        }

        $this->appendAttribute('style', $string);
    }
private function appendStyles(array $styles)
    {
        if (empty($styles)) {
            return;
        }

        $string = '';
        $prependSemicolon = false;
        foreach ($styles as $key => $value) {
            if ($prependSemicolon) {
                $string .= '; ';
            }
            $prependSemicolon = true;
            $string .= $key.': '.$value;
        }

        $this->appendAttribute('style', $string);
    }
private function appendStyles ( array $ styles ) { if ( empty ( $ styles ) ) { return ; } $ string = '' ; $ prependSemicolon = false ; foreach ( $ styles as $ key => $ value ) { if ( $ prependSemicolon ) { $ string .= '; ' ; } $ prependSemicolon = true ; $ string .= $ key . ': ' . $ value ; } $ this -> appendAttribute ( 'style' , $ string ) ; }
Converts the given styles into a CSS string, then appends a 'style'
attribute with the value set to that string to this writer's output.

@param string[] $styles An associative array of styles for the attribute.

@return void
Converts the given styles into a CSS string then appends a style attribute with the value set to that string to this writer s output .