When I pass the DomCralwer Object to my helper function:
function extractText(Crawler $crawler, $selector)
{
$result = $crawler->filter($selector)->extract['_text'];
return $result ? $result[0] : false;
}
it can not recognize the extract
method on it:
Undefined property: Symfony\Component\DomCrawler\Crawler::$extract
Where is my problem?
I am quite new to php
and symfony
.