@@ -37,18 +37,17 @@ Creating a Client
37
37
~~~~~~~~~~~~~~~~~
38
38
39
39
The component only provides an abstract client and does not provide any backend
40
- ready to use for the HTTP layer.
41
-
42
- To create your own client, you must extend the abstract ``Client `` class and
43
- implement the :method: `Symfony\\ Component\\ BrowserKit\\ Client::doRequest ` method.
40
+ ready to use for the HTTP layer. To create your own client, you must extend the
41
+ ``AbstractBrowser `` class and implement the
42
+ :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser::doRequest ` method.
44
43
This method accepts a request and should return a response::
45
44
46
45
namespace Acme;
47
46
48
- use Symfony\Component\BrowserKit\Client as BaseClient ;
47
+ use Symfony\Component\BrowserKit\AbstractBrowser ;
49
48
use Symfony\Component\BrowserKit\Response;
50
49
51
- class Client extends BaseClient
50
+ class Client extends AbstractBrowser
52
51
{
53
52
protected function doRequest($request)
54
53
{
@@ -67,7 +66,7 @@ provided by the :doc:`HttpKernel component </components/http_kernel>`.
67
66
Making Requests
68
67
~~~~~~~~~~~~~~~
69
68
70
- Use the :method: `Symfony\\ Component\\ BrowserKit\\ Client ::request ` method to
69
+ Use the :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser ::request ` method to
71
70
make HTTP requests. The first two arguments are the HTTP method and the requested
72
71
URL::
73
72
@@ -81,7 +80,7 @@ The value returned by the ``request()`` method is an instance of the
81
80
:doc: `DomCrawler component </components/dom_crawler >`, which allows accessing
82
81
and traversing HTML elements programmatically.
83
82
84
- The :method: `Symfony\\ Component\\ BrowserKit\\ Client ::xmlHttpRequest ` method,
83
+ The :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser ::xmlHttpRequest ` method,
85
84
which defines the same arguments as the ``request() `` method, is a shortcut to
86
85
make AJAX requests::
87
86
0 commit comments