src/PowerTools/HTML5/Elements.php
public static function isA($name, $mask) {
        if (!static::isElement($name)) {
            return false;
        }

        return (static::element($name) & $mask) == $mask;
    }
public static function isA($name, $mask) {
        if (!static::isElement($name)) {
            return false;
        }

        return (static::element($name) & $mask) == $mask;
    }
public static function isA ( $ name , $ mask ) { if ( ! static :: isElement ( $ name ) ) { return false ; } return ( static :: element ( $ name ) & $ mask ) == $ mask ; }
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.

@param string $name
The element name.
@param int $mask
One of the constants on this class.
@return boolean true if the element matches the mask, false otherwise.
Check whether the given element meets the given criterion .