public function replaceChildAt($index, XMLElement $child = null)
    {
        if (!is_numeric($index)) {
            return false;
        }

        $this->validateChild($child);

        $index = $this->getRealIndex($index);

        if (!isset($this->_children[$index])) {
            return false;
        }

        $this->_children[$index] = $child;

        return true;
    }
public function replaceChildAt($index, XMLElement $child = null)
    {
        if (!is_numeric($index)) {
            return false;
        }

        $this->validateChild($child);

        $index = $this->getRealIndex($index);

        if (!isset($this->_children[$index])) {
            return false;
        }

        $this->_children[$index] = $child;

        return true;
    }
public function replaceChildAt ( $ index , XMLElement $ child = null ) { if ( ! is_numeric ( $ index ) ) { return false ; } $ this -> validateChild ( $ child ) ; $ index = $ this -> getRealIndex ( $ index ) ; if ( ! isset ( $ this -> _children [ $ index ] ) ) { return false ; } $ this -> _children [ $ index ] = $ child ; return true ; }
Given the position of the child to replace, and an `XMLElement`
of the replacement child, this function will replace one child
with another

@since Symphony 2.2.2
@param integer $index
The index of the child to be replaced. If the index given is negative
it will be calculated from the end of `$this->_children`.
@param XMLElement $child
An XMLElement of the new child
@return boolean
Given the position of the child to replace and an XMLElement of the replacement child this function will replace one child with another