public function before()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            if ($node->parentNode instanceof \DOMDocument) {
                throw new \Exception('Can not set before root element '.$node->tagName.' of document');
            }

            $node->parentNode->insertBefore($imported_node, $node);
        });

        return $this;
    }
public function before()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            if ($node->parentNode instanceof \DOMDocument) {
                throw new \Exception('Can not set before root element '.$node->tagName.' of document');
            }

            $node->parentNode->insertBefore($imported_node, $node);
        });

        return $this;
    }
public function before ( ) { $ this -> importNodes ( \ func_get_args ( ) , function ( $ node , $ imported_node ) { if ( $ node -> parentNode instanceof \ DOMDocument ) { throw new \ Exception ( 'Can not set before root element ' . $ node -> tagName . ' of document' ) ; } $ node -> parentNode -> insertBefore ( $ imported_node , $ node ) ; } ) ; return $ this ; }
Insert content before each element in the set of matched elements.

@param string|self $content,...

@return $this
Insert content before each element in the set of matched elements .