protected function _getMergeRule($element, &$affected = null, $rule = null)
    {
        if ($rule instanceof MergeRuleInterface) {
            $result = $rule($this, $element, $affected);

            if ($result !== false) {
                return $result;
            }
        }

        $name = $element->getName();
        if (isset($this->{$name})) {
            $affected = $this->{$name};
            return self::MERGE_REPLACE;
        }

        return self::MERGE_APPEND;
    }
protected function _getMergeRule($element, &$affected = null, $rule = null)
    {
        if ($rule instanceof MergeRuleInterface) {
            $result = $rule($this, $element, $affected);

            if ($result !== false) {
                return $result;
            }
        }

        $name = $element->getName();
        if (isset($this->{$name})) {
            $affected = $this->{$name};
            return self::MERGE_REPLACE;
        }

        return self::MERGE_APPEND;
    }
protected function _getMergeRule ( $ element , & $ affected = null , $ rule = null ) { if ( $ rule instanceof MergeRuleInterface ) { $ result = $ rule ( $ this , $ element , $ affected ) ; if ( $ result !== false ) { return $ result ; } } $ name = $ element -> getName ( ) ; if ( isset ( $ this -> { $ name } ) ) { $ affected = $ this -> { $ name } ; return self :: MERGE_REPLACE ; } return self :: MERGE_APPEND ; }
find merge rule

@param \rampage\core\xml\SimpleXmlElement $element
@param \rampage\core\xml\SimpleXmlElement $affected
@return int
find merge rule