processAttributesBySchema() public method

public processAttributesBySchema ( $element )
Esempio n. 1
0
 /**
  * processAttributesBySchema
  * Parses customattributes attribute and splits it into actual
  * custom: xml attributes, passes processing of normal attributes
  * to parent class.
  *
  * @param DOMElement $element
  */
 function processAttributesBySchema($element)
 {
     // custom attributes conversion
     $attr = $element->getAttribute('customattributes');
     if ($attr) {
         $attrArray = explode('attribute_separation', $attr);
         foreach ($attrArray as $attr) {
             if ($attr !== '' && strpos($attr, '|') !== false) {
                 list($attrName, $attrValue) = explode('|', $attr);
                 $element->setAttributeNS('http://ez.no/namespaces/ezpublish3/custom/', 'custom:' . $attrName, $attrValue);
             }
         }
     }
     parent::processAttributesBySchema($element);
 }