8000 [DomCrawler] Added return of element name in `extract()` method · symfony/symfony-docs@b89cd59 · GitHub
[go: up one dir, main page]

Skip to content

Commit b89cd59

Browse files
Andrey Helldarjaviereguiluz
Andrey Helldar
authored andcommitted
[DomCrawler] Added return of element name in extract() method
1 parent c587a66 commit b89cd59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/dom_crawler.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,13 @@ Extract attribute and/or node values from the list of nodes::
214214

215215
$attributes = $crawler
216216
->filterXpath('//body/p')
217-
->extract(array('_text', 'class'))
217+
->extract(array('_name', '_text', 'class'))
218218
;
219219

220220
.. note::
221221

222-
Special attribute ``_text`` represents a node value.
222+
Special attribute ``_text`` represents a node value, while ``_name`` represents element name.
223+
Attribute ``_name`` will be added in version 4.3.
223224

224225
Call an anonymous function on each node of the list::
225226

0 commit comments

Comments
 (0)
0