public function extract($dom, $url)
    {
        $this->resetUrls();
        $crawler = new DomCrawler($dom, $url);
        $links = $crawler->filter('body a')->links();

        foreach ($links as $link) {
            if (!in_array($link->getUri(), $this->urls)) {
                $this->urls[] = $link->getUri();
            }
        }

        return $this->urls;
    }
public function extract($dom, $url)
    {
        $this->resetUrls();
        $crawler = new DomCrawler($dom, $url);
        $links = $crawler->filter('body a')->links();

        foreach ($links as $link) {
            if (!in_array($link->getUri(), $this->urls)) {
                $this->urls[] = $link->getUri();
            }
        }

        return $this->urls;
    }
public function extract ( $ dom , $ url ) { $ this -> resetUrls ( ) ; $ crawler = new DomCrawler ( $ dom , $ url ) ; $ links = $ crawler -> filter ( 'body a' ) -> links ( ) ; foreach ( $ links as $ link ) { if ( ! in_array ( $ link -> getUri ( ) , $ this -> urls ) ) { $ this -> urls [ ] = $ link -> getUri ( ) ; } } return $ this -> urls ; }
Extract the urls contained in the body of the provided dom.

@param mixed $dom
@param string $url
@return array
Extract the urls contained in the body of the provided dom .