@@ -165,14 +165,13 @@ Namespaces can be explicitly registered with the
165
165
$crawler->registerNamespace('m', 'http://search.yahoo.com/mrss/');
166
166
$crawler = $crawler->filterXPath('//m:group//yt:aspectRatio');
167
167
168
- .. versionadded :: 4.4
169
-
170
- The ``matches() `` method was introduced in Symfony 4.4.
171
-
172
168
Verify if the current node matches a selector::
173
169
174
170
$crawler->matches('p.lorem');
175
171
172
+ .. versionadded :: 4.4
173
+
174
+ The ``matches() `` method was introduced in Symfony 4.4.
176
175
177
176
Node Traversing
178
177
~~~~~~~~~~~~~~~
@@ -204,14 +203,14 @@ Get all the direct child nodes matching a CSS selector::
204
203
205
204
$crawler->filter('body')->children('p.lorem');
206
205
207
- .. versionadded :: 4.4
208
-
209
- The ``closest() `` method was introduced in Symfony 4.4.
210
-
211
206
Get the first parents (heading toward the document root) of the Element that matches the provided selector::
212
207
213
208
$crawler->closest('p.lorem');
214
209
210
+ .. versionadded :: 4.4
211
+
212
+ The ``closest() `` method was introduced in Symfony 4.4.
213
+
215
214
.. note ::
216
215
217
216
All the traversal methods return a new :class: `Symfony\\ Component\\ DomCrawler\\ Crawler `
@@ -350,6 +349,8 @@ and :phpclass:`DOMNode` objects::
350
349
// avoid the exception passing an argument that html() returns when node does not exist
351
350
$html = $crawler->html('Default <strong>HTML</strong> content');
352
351
352
+ $html = $crawler->outerHtml();
353
+
353
354
.. versionadded :: 4.3
354
355
355
356
The default argument of ``html() `` was introduced in Symfony 4.3.
@@ -358,7 +359,6 @@ and :phpclass:`DOMNode` objects::
358
359
359
360
The ``outerHtml() `` method was introduced in Symfony 4.4.
360
361
361
- $html = $crawler->outerHtml();
362
362
363
363
364
364
Expression Evaluation
0 commit comments