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: SymfonyComponentDomCrawlerCrawler::$extract
Where is my problem?
I am quite new to php
and symphony
.
Source: Symfony Questions
Was this helpful?
0 / 0