toKebabCase example

$defs = new SVGDefs();
                foreach ($this->getChildren($svg->getDocument()) as $child) {
                    $svg->getDocument()->removeChild($child);
                    $defs->addChild($child);
                }
                $svg->getDocument()->addChild($defs);
            }

            $child = $defs->getChild(0);

            if ($child->getAttribute('id') === null || $cleanup) {
                $id = 'icons-' . $package . '-' . self::toKebabCase(basename($file, '.svg'));
                $child->setAttribute('id', $id);
            } else {
                $id = $child->getAttribute('id');
            }

            $use = null;
            foreach ($this->getChildren($svg->getDocument()) as $child) {
                if ($child instanceof SVGUse) {
                    $use = $child;
                }
            }

            
Home | Imprint | This part of the site doesn't use cookies.