public static function Elements::isA in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/masterminds/html5/src/HTML5/Elements.php \Masterminds\HTML5\Elements::isA()
Check whether the given element meets the given criterion.
Example:
Elements::isA('script', Elements::TEXT_RAW); // Returns true.
Elements::isA('script', Elements::TEXT_RCDATA); // Returns false.
Parameters
string $name: The element name.
int $mask: One of the constants on this class.
Return value
boolean true if the element matches the mask, false otherwise.
5 calls to Elements::isA()
- DOMTreeBuilder::endTag in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ DOMTreeBuilder.php - An end-tag.
- DOMTreeBuilder::startTag in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ DOMTreeBuilder.php - Process the start tag.
- ElementsTest::testIsA in vendor/
masterminds/ html5/ test/ HTML5/ ElementsTest.php - OutputRules::element in vendor/
masterminds/ html5/ src/ HTML5/ Serializer/ OutputRules.php - Write an element.
- OutputRules::text in vendor/
masterminds/ html5/ src/ HTML5/ Serializer/ OutputRules.php - Write a text node.
File
- vendor/
masterminds/ html5/ src/ HTML5/ Elements.php, line 486
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\HTML5Code
public static function isA($name, $mask) {
if (!static::isElement($name)) {
return false;
}
return (static::element($name) & $mask) == $mask;
}