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

[Browserkit] The Client class has been replaced by the AbstractBrowser since SF 4.3#13550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletionscomponents/browser_kit.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,16 +39,16 @@ Creating a Client
The component only provides an abstract client and does not provide any backend
ready to use for the HTTP layer.

To create your own client, you must extend theabstract ``Client`` class and
implement the :method:`Symfony\\Component\\BrowserKit\\Client::doRequest` method.
To create your own client, you must extend the``AbstractBrowser`` class and
implement the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::doRequest` method.
This method accepts a request and should return a response::

namespace Acme;

use Symfony\Component\BrowserKit\Client as BaseClient;
use Symfony\Component\BrowserKit\AbstractBrowser;
use Symfony\Component\BrowserKit\Response;

class Client extendsBaseClient
class Client extendsAbstractBrowser
{
protected function doRequest($request)
{
Expand All@@ -67,7 +67,7 @@ provided by the :doc:`HttpKernel component </components/http_kernel>`.
Making Requests
~~~~~~~~~~~~~~~

Use the :method:`Symfony\\Component\\BrowserKit\\Client::request` method to
Use the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::request` method to
make HTTP requests. The first two arguments are the HTTP method and the requested
URL::

Expand All@@ -81,7 +81,7 @@ The value returned by the ``request()`` method is an instance of the
:doc:`DomCrawler component </components/dom_crawler>`, which allows accessing
and traversing HTML elements programmatically.

The :method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest` method,
The :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest` method,
which defines the same arguments as the ``request()`` method, is a shortcut to
make AJAX requests::

Expand Down
2 changes: 1 addition & 1 deletiontesting.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -484,7 +484,7 @@ script::
AJAX Requests
~~~~~~~~~~~~~

The Client provides a :method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest`
The Client provides a :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest`
method, which has the same arguments as the ``request()`` method, and it's a
shortcut to make AJAX requests::

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp