We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7fff5c3 + cb7af2a commit 83b469fCopy full SHA for 83b469f
testing.rst
@@ -787,6 +787,8 @@ Extracting Information
787
788
The Crawler can extract information from the nodes::
789
790
+ use Symfony\Component\DomCrawler\Crawler;
791
+
792
// returns the attribute value for the first node
793
$crawler->attr('class');
794
@@ -807,7 +809,7 @@ The Crawler can extract information from the nodes::
807
809
$info = $crawler->extract(['_text', 'href']);
808
810
811
// executes a lambda for each node and return an array of results
- $data = $crawler->each(function ($node, $i) {
812
+ $data = $crawler->each(function (Crawler $node, $i) {
813
return $node->attr('href');
814
});
815
0 commit comments