public function insertBefore($element)
    {
        $e = self::create($element);
        $newnodes = array();
        foreach ($e as $i => $node) {
            /** @var \DOMNode $node */
            foreach ($this as $newnode) {
                /** @var \DOMNode $newnode */
                $newnode = static::importNewnode($newnode, $node, $i);
                if ($newnode !== $node) {
                    $node->parentNode->insertBefore($newnode, $node);
                }
                $newnodes[] = $newnode;
            }
        }
        return self::create($newnodes);
    }
public function insertBefore($element)
    {
        $e = self::create($element);
        $newnodes = array();
        foreach ($e as $i => $node) {
            /** @var \DOMNode $node */
            foreach ($this as $newnode) {
                /** @var \DOMNode $newnode */
                $newnode = static::importNewnode($newnode, $node, $i);
                if ($newnode !== $node) {
                    $node->parentNode->insertBefore($newnode, $node);
                }
                $newnodes[] = $newnode;
            }
        }
        return self::create($newnodes);
    }
public function insertBefore ( $ element ) { $ e = self :: create ( $ element ) ; $ newnodes = array ( ) ; foreach ( $ e as $ i => $ node ) { /** @var \DOMNode $node */ foreach ( $ this as $ newnode ) { /** @var \DOMNode $newnode */ $ newnode = static :: importNewnode ( $ newnode , $ node , $ i ) ; if ( $ newnode !== $ node ) { $ node -> parentNode -> insertBefore ( $ newnode , $ node ) ; } $ newnodes [ ] = $ newnode ; } } return self :: create ( $ newnodes ) ; }
Insert every element in the set of matched elements before the target.

@param string|HtmlPageCrawler|\DOMNode|\DOMNodeList $element
@return \Wa72\HtmlPageDom\HtmlPageCrawler A new Crawler object containing all elements appended to the target elements
@api
Insert every element in the set of matched elements before the target .