You are here

public static function Elements::isHtml5Element in Zircon Profile 8

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

Test if an element is a valid html5 element.

Parameters

string $name: The name of the element.

Return value

bool True if a html5 element and false otherwise.

3 calls to Elements::isHtml5Element()
Elements::isElement in vendor/masterminds/html5/src/HTML5/Elements.php
Is an element name valid in an html5 document.
ElementsTest::testIsHtml5Element in vendor/masterminds/html5/test/HTML5/ElementsTest.php
Tokenizer::rcdata in vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
Read text in RCDATA mode.

File

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

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 isHtml5Element($name) {

  // html5 element names are case insensetitive. Forcing lowercase for the check.
  // Do we need this check or will all data passed here already be lowercase?
  return isset(static::$html5[strtolower($name)]);
}