public function append(DOMElement &$parent, &$child)
    {
        // Check element
        if (empty($child)) {
            throw new InvalidArgumentException('You are trying to append an empty element.');
        }

        // Append element
        $parent->appendChild($child);

        // Return the DOMElement
        return $parent;
    }
public function append(DOMElement &$parent, &$child)
    {
        // Check element
        if (empty($child)) {
            throw new InvalidArgumentException('You are trying to append an empty element.');
        }

        // Append element
        $parent->appendChild($child);

        // Return the DOMElement
        return $parent;
    }
public function append ( DOMElement & $ parent , & $ child ) { // Check element if ( empty ( $ child ) ) { throw new InvalidArgumentException ( 'You are trying to append an empty element.' ) ; } // Append element $ parent -> appendChild ( $ child ) ; // Return the DOMElement return $ parent ; }
Append an element as a child.

@param DOMElement $parent The DOMElement to handle.
@param DOMNode    $child  The child element.

@return DOMElement

@throws InvalidArgumentException
Append an element as a child .