replace() public method

Replaces a child.
public replace ( $newNode, boolean $clone = true ) : Element
$clone boolean Clone the node if true, otherwise move it
return Element The node that has been replaced
Esempio n. 1
0
 /**
  * @expectedException LogicException
  */
 public function testReplaceElementWithoutParentNode()
 {
     $element = new Element('div', 'Foo');
     $element->replace(new Element('div', 'Bar'));
 }