Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e278e13

Browse files
lyrixxOskarStark
andcommitted
Apply suggestions from code review
Co-Authored-By: Oskar Stark <[email protected]>
1 parent d3f0ed5 commit e278e13

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

components/dom_crawler.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -620,21 +620,20 @@ the whole form or specific field(s)::
620620
$form->disableValidation();
621621
$form['country']->select('Invalid value');
622622

623-
Expanding URI
623+
Resolving URI
624624
~~~~~~~~~~~~~
625625

626626
.. versionadded:: 5.1
627627

628-
The UriExpander helper was added in Symfony 5.1.
628+
The `UriResolver` helper was added in Symfony 5.1.
629629

630-
The :class:`Symfony\\Component\\DomCrawler\\UriExpander` class provides method
631-
to expand a relative link::
630+
The :class:`Symfony\\Component\\DomCrawler\\UriResolver` class takes an URI
631+
(relative, absolute, fragment, etc.) and turns it into an absolute URI against
632+
another given base URI.::
632633

633-
UriExpander::expand($uri, $currentUri);
634-
// For example:
635-
UriExpander::expand('/foo', 'http://localhost/bar/foo/'); // => 'http://localhost/foo'
636-
UriExpander::expand('?a=b', 'http://localhost/bar#foo'; // => 'http://localhost/bar?a=b'
637-
UriExpander::expand('../../', 'http://localhost/'; // => http://localhost/'
634+
UriResolver::resolve('/foo', 'http://localhost/bar/foo/'); // => 'http://localhost/foo'
635+
UriResolver::resolve('?a=b', 'http://localhost/bar#foo'); // => 'http://localhost/bar?a=b'
636+
UriResolver::resolve('../../', 'http://localhost/'); // => http://localhost/'
638637

639638
Learn more
640639
----------

0 commit comments

Comments
 (0)