8000 [DomCrawler] Added return of element name in `extract()` method by andrey-helldar · Pull Request #10646 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[DomCrawler] Added return of element name in extract() method #10646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed description and updated example
  • Loading branch information
Andrey Helldar authored Nov 7, 2018
commit 88ecb9b1d505b9144a0a358b5eefc97017d96d16
4 changes: 2 additions & 2 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ Extract attribute and/or node values from the list of nodes::

$attributes = $crawler
->filterXpath('//body/p')
->extract(array('_text', 'class'))
->extract(array('_name', '_text', 'class'))
;

.. note::

Special attribute ``_text`` represents a node value and `_name`. for a element name.
Special attribute `_text` represents a node value, while `_name` represents element name.

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

Expand Down
0