public function addChild(Node $node, $property_name = NULL) {
    $this->appendChild($node);
    if ($property_name !== NULL) {
      $this->{$property_name} = $node;
    }
    return $this;
  }
public function addChild(Node $node, $property_name = NULL) {
    $this->appendChild($node);
    if ($property_name !== NULL) {
      $this->{$property_name} = $node;
    }
    return $this;
  }
public function addChild ( Node $ node , $ property_name = NULL ) { $ this -> appendChild ( $ node ) ; if ( $ property_name !== NULL ) { $ this -> { $ property_name } = $ node ; } return $ this ; }
Add a child to node.

Internal use only, used by parser when building a node.

@param Node $node
@param string $property_name
@return $this
Add a child to node .