public function addChild($child)
    {
        if (null === $this->children) {
            $this->children = new ArrayCollection();
        }

        $this->children->add($child);

        return $this;
    }
public function addChild($child)
    {
        if (null === $this->children) {
            $this->children = new ArrayCollection();
        }

        $this->children->add($child);

        return $this;
    }
public function addChild ( $ child ) { if ( null === $ this -> children ) { $ this -> children = new ArrayCollection ( ) ; } $ this -> children -> add ( $ child ) ; return $ this ; }
Add a child to this document.

@param $child

@return $this
Add a child to this document .