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

@param string|HtmlPageCrawler|\DOMNode|\DOMNodeList $content
@return HtmlPageCrawler $this for chaining
@api
Insert content specified by the parameter before each element in the set of matched elements .