protected function createCrawlerFromContent($uri, $content, $type)
    {
        if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
            return;
        }

        $crawler = new Crawler(null, $uri);
        $crawler->addContent($content, $type);

        return $crawler;
    }
protected function createCrawlerFromContent($uri, $content, $type)
    {
        if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
            return;
        }

        $crawler = new Crawler(null, $uri);
        $crawler->addContent($content, $type);

        return $crawler;
    }
protected function createCrawlerFromContent ( $ uri , $ content , $ type ) { if ( ! class_exists ( 'Symfony\Component\DomCrawler\Crawler' ) ) { return ; } $ crawler = new Crawler ( null , $ uri ) ; $ crawler -> addContent ( $ content , $ type ) ; return $ crawler ; }
Creates a crawler.

This method returns null if the DomCrawler component is not available.

@param string $uri     A URI
@param string $content Content for the crawler to use
@param string $type    Content type

@return Crawler|null
Creates a crawler .