public function mergeAttributes(SimpleXmlElement $node, $replace = true)
    {
        foreach ($node->attributes() as $name => $value) {
            if (isset($this[$name])) {
                if ($replace) {
                    $this[$name] = (string)$value;
                }

                continue;
            }

            $this->addAttribute($name, (string)$value);
        }

        return $this;
    }
public function mergeAttributes(SimpleXmlElement $node, $replace = true)
    {
        foreach ($node->attributes() as $name => $value) {
            if (isset($this[$name])) {
                if ($replace) {
                    $this[$name] = (string)$value;
                }

                continue;
            }

            $this->addAttribute($name, (string)$value);
        }

        return $this;
    }
public function mergeAttributes ( SimpleXmlElement $ node , $ replace = true ) { foreach ( $ node -> attributes ( ) as $ name => $ value ) { if ( isset ( $ this [ $ name ] ) ) { if ( $ replace ) { $ this [ $ name ] = ( string ) $ value ; } continue ; } $ this -> addAttribute ( $ name , ( string ) $ value ) ; } return $ this ; }
Merge attributes from the given node to this one

@param \rampage\core\xml\SimpleXmlElement $node
@param bool $replace
Merge attributes from the given node to this one