You are here

public static function Elements::normalizeSvgAttribute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/masterminds/html5/src/HTML5/Elements.php \Masterminds\HTML5\Elements::normalizeSvgAttribute()

Normalize a SVG attribute name to its proper case and form.

Parameters

string $name: The name of the attribute.

Return value

string The normalized form of the attribute name.

3 calls to Elements::normalizeSvgAttribute()
DOMTreeBuilder::startTag in vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php
Process the start tag.
ElementsTest::testNormalizeSvgAttribute in vendor/masterminds/html5/test/HTML5/ElementsTest.php
OutputRules::attrs in vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php

File

vendor/masterminds/html5/src/HTML5/Elements.php, line 603

Class

Elements
This class provides general information about HTML5 elements, including syntactic and semantic issues. Parsers and serializers can use this class as a reference point for information about the rules of various HTML5 elements.

Namespace

Masterminds\HTML5

Code

public static function normalizeSvgAttribute($name) {
  $name = strtolower($name);
  if (isset(static::$svgCaseSensitiveAttributeMap[$name])) {
    $name = static::$svgCaseSensitiveAttributeMap[$name];
  }
  return $name;
}