Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb89cd59

Browse files
Andrey Helldarjaviereguiluz
Andrey Helldar
authored andcommitted
[DomCrawler] Added return of element name inextract() method
1 parentc587a66 commitb89cd59

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)

[8]ページ先頭

©2009-2025 Movatter.jp