protected function getAttributeName(DOMElement $element, $attribute)
    {
        if ($this->isWebComponentFriendly() === true && preg_match('/^qti-/', $element->localName) === 1) {
            $qtiFriendlyClassName = XmlUtils::qtiFriendlyName($element->localName);
        
            if (in_array($qtiFriendlyClassName, self::$webComponentFriendlyClasses) === true) {
                return XmlUtils::webComponentFriendlyAttributeName($attribute);
            }
        }
        
        return $attribute;
    }
protected function getAttributeName(DOMElement $element, $attribute)
    {
        if ($this->isWebComponentFriendly() === true && preg_match('/^qti-/', $element->localName) === 1) {
            $qtiFriendlyClassName = XmlUtils::qtiFriendlyName($element->localName);
        
            if (in_array($qtiFriendlyClassName, self::$webComponentFriendlyClasses) === true) {
                return XmlUtils::webComponentFriendlyAttributeName($attribute);
            }
        }
        
        return $attribute;
    }
protected function getAttributeName ( DOMElement $ element , $ attribute ) { if ( $ this -> isWebComponentFriendly ( ) === true && preg_match ( '/^qti-/' , $ element -> localName ) === 1 ) { $ qtiFriendlyClassName = XmlUtils :: qtiFriendlyName ( $ element -> localName ) ; if ( in_array ( $ qtiFriendlyClassName , self :: $ webComponentFriendlyClasses ) === true ) { return XmlUtils :: webComponentFriendlyAttributeName ( $ attribute ) ; } } return $ attribute ; }
Get Attribute Name to Use for Marshalling

This method provides the attribute name to be used to retrieve an element attribute value
by considering whether or not the Marshaller implementation is running in Web Component
Friendly mode.

Examples:

In case of the Marshaller implementation IS NOT running in Web Component Friendly mode,
calling this method on an $element "choiceInteraction" and a "responseIdentifier" $attribute, the
"responseIdentifier" value is returned.

On the other hand, in case of the Marshaller implementation IS running in Web Component Friendly mode,
calling this method on an $element "choiceInteraction" and a "responseIdentifier" $attribute, the
"response-identifier" value is returned.

@param \DOMElement $element
@param $attribute
@return string
Get Attribute Name to Use for Marshalling