Skip to content

Commit d42b21a

Browse files
committed
[Components][DomCrawler] Wrapped lines after first word exceeding 72 characters.
1 parent d773496 commit d42b21a

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

components/dom_crawler.rst

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ You can install the component in many different ways:
1818
Usage
1919
-----
2020

21-
The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods to query and manipulate HTML and XML documents.
21+
The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods
22+
to query and manipulate HTML and XML documents.
2223

23-
Instance of the Crawler represents a set (:phpclass:`SplObjectStorage`) of :phpclass:`DOMElement` objects:
24+
Instance of the Crawler represents a set (:phpclass:`SplObjectStorage`)
25+
of :phpclass:`DOMElement` objects:
2426

2527
.. code-block:: php
2628
@@ -41,7 +43,9 @@ Instance of the Crawler represents a set (:phpclass:`SplObjectStorage`) of :phpc
4143
print $domElement->nodeName;
4244
}
4345
44-
More specialized :class:`Symfony\\Component\\DomCrawler\\Link` and :class:`Symfony\\Component\\DomCrawler\\Form` classes are useful for interacting with html links and forms.
46+
More specialized :class:`Symfony\\Component\\DomCrawler\\Link` and
47+
:class:`Symfony\\Component\\DomCrawler\\Form` classes are useful for
48+
interacting with html links and forms.
4549

4650
Node Filtering
4751
~~~~~~~~~~~~~~
@@ -52,7 +56,10 @@ Using XPath expressions is really simplified:
5256
5357
$crawler = $crawler->filterXPath('descendant-or-self::body/p');
5458
55-
.. tip:: :phpmethod:`DOMXPath::query` is used internally to actually perform an XPath query.
59+
.. tip::
60+
61+
:phpmethod:`DOMXPath::query` is used internally to actually perform
62+
an XPath query.
5663

5764
Filtering is even easier if you have CssSelector Component installed:
5865

@@ -71,7 +78,10 @@ Anonymous function can be used to filter with more complex criteria:
7178
7279
To remove a node the anonymous function must return false.
7380

74-
.. note:: All filter methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler` instance with filtered content.
81+
.. note::
82+
83+
All filter methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler`
84+
instance with filtered content.
7585

7686
Node Traversing
7787
~~~~~~~~~~~~~~~
@@ -109,7 +119,10 @@ Get all the child or parent nodes:
109119
$crawler->filter('body')->children();
110120
$crawler->filter('body > p')->parents();
111121
112-
.. note:: All the traversal methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler` instance.
122+
.. note::
123+
124+
All the traversal methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler`
125+
instance.
113126

114127
Accessing Node Values
115128
~~~~~~~~~~~~~~~~~~~~~
@@ -142,7 +155,8 @@ Call an anonymous function on each node of the list:
142155
return $node->nodeValue;
143156
});
144157
145-
The anonymous function receives the position and the node as arguments. Result is an array of values returned by anonymous function calls.
158+
The anonymous function receives the position and the node as arguments.
159+
Result is an array of values returned by anonymous function calls.
146160

147161
Adding the Content
148162
~~~~~~~~~~~~~~~~~~
@@ -162,7 +176,9 @@ Crawler supports multiple ways of adding the content:
162176
$crawler->add('<html><body /></html>');
163177
$crawler->add('<root><node /></root>');
164178
165-
As Crawler's implementation is based on the DOM extension it is also able to interact with native :phpclass:`DOMDocument`, :phpclass:`DOMNodeList` and :phpclass:`DOMNode` objects:
179+
As Crawler's implementation is based on the DOM extension it is also able
180+
to interact with native :phpclass:`DOMDocument`, :phpclass:`DOMNodeList`
181+
and :phpclass:`DOMNode` objects:
166182

167183
.. code-block:: php
168184

0 commit comments

Comments
 (0)