Symfony\Bundle\FrameworkBundle\Client
Client simulates a browser and makes requests to a Kernel object.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Client
extends Client
{
- // members
- private $hasPerformedRequest;
- private $profiler;
- // Inherited members from Client
- protected $kernel;
- // Inherited members from Client
- protected $history;
- protected $cookieJar;
- protected $server;
- protected $internalRequest;
- protected $request;
- protected $internalResponse;
- protected $response;
- protected $crawler;
- protected $insulated;
- protected $redirect;
- protected $followRedirects;
- // methods
- public void __construct()
- public ContainerInterface getContainer()
- public KernelInterface getKernel()
- public Profile getProfile()
- public void enableProfiler()
- protected Response doRequest()
- protected Response doRequestInProcess()
- protected string getScript()
- // Inherited methods from Client
- public void __construct()
- public Request|null getRequest()
- public Response|null getResponse()
- protected Response doRequest()
- protected string getScript()
- protected Request filterRequest()
- protected array filterFiles()
- protected Response filterResponse()
- // Inherited methods from Client
- public void __construct()
- public void followRedirects()
- public void setMaxRedirects()
- public void insulate()
- public void setServerParameters()
- public void setServerParameter()
- public string getServerParameter()
- public History getHistory()
- public CookieJar getCookieJar()
- public Crawler|null getCrawler()
- public Response|null getInternalResponse()
- public object|null getResponse()
- public Request|null getInternalRequest()
- public object|null getRequest()
- public Crawler click()
- public Crawler submit()
- public Crawler request()
- protected doRequestInProcess()
- protected abstract doRequest()
- protected void getScript()
- protected filterRequest()
- protected Response filterResponse()
- protected Crawler|null createCrawlerFromContent()
- public Crawler back()
- public Crawler forward()
- public Crawler reload()
- public Crawler followRedirect()
- public void restart()
- protected string getAbsoluteUri()
- protected Crawler requestFromRequest()
Hierarchy
Members
private
- $hasPerformedRequest
- $profiler
protected
- $crawler
- $followRedirects
- $history
- $insulated
- $internalRequest
- $internalResponse
- $kernel
- $redirect
- $request
- $response
- $server
Methods
protected
- doRequest() — {@inheritdoc}
- doRequestInProcess() — {@inheritdoc}
- getScript() — Returns the script to execute when the request must be insulated.
public
- __construct()
- enableProfiler() — Enables the profiler for the very next request.
- getContainer() — Returns the container.
- getKernel() — Returns the kernel.
- getProfile() — Gets the profile associated with the current Response.
Inherited from Symfony\Component\HttpKernel\Client
protected
- doRequest() — Makes a request.
- filterFiles() — Filters an array of files.
- filterRequest() — Converts the BrowserKit request to a HttpKernel request.
- filterResponse() — Converts the HttpKernel response to a BrowserKit response.
- getScript() — Returns the script to execute when the request must be insulated.
public
- getRequest() — {@inheritdoc}
- getResponse() — {@inheritdoc}
Inherited from Symfony\Component\BrowserKit\Client
protected
- createCrawlerFromContent() — Creates a crawler.
- doRequest() — Makes a request.
- doRequestInProcess() — Makes a request in another process.
- filterRequest() — Filters the BrowserKit request to the origin one.
- filterResponse() — Filters the origin response to the BrowserKit one.
- getAbsoluteUri() — Takes a URI and converts it to absolute if it is not already absolute.
- getScript() — Returns the script to execute when the request must be insulated.
- requestFromRequest() — Makes a request from a Request object directly.
public
- back() — Goes back in the browser history.
- click() — Clicks on a given link.
- followRedirect() — Follow redirects?
- followRedirects() — Sets whether to automatically follow redirects or not.
- forward() — Goes forward in the browser history.
- getCookieJar() — Returns the CookieJar instance.
- getCrawler() — Returns the current Crawler instance.
- getHistory() — Returns the History instance.
- getInternalRequest() — Returns the current BrowserKit Request instance.
- getInternalResponse() — Returns the current BrowserKit Response instance.
- getRequest() — Returns the current origin Request instance.
- getResponse() — Returns the current origin response instance.
- getServerParameter() — Gets single server parameter for specified key.
- insulate() — Sets the insulated flag.
- reload() — Reloads the current browser.
- request() — Calls a URI.
- restart() — Restarts the client.
- setMaxRedirects() — Sets the maximum number of requests that crawler can follow.
- setServerParameter() — Sets single server parameter.
- setServerParameters() — Sets server parameters.
- submit() — Submits a form.