Client
class Client extends Client
Client simulates a browser and makes requests to a Kernel object.
Methods
Constructor.
Sets whether to automatically follow redirects or not.
Returns whether client automatically follows redirects or not.
Sets the maximum number of requests that crawler can follow.
Gets single server parameter for specified key.
Returns the current origin response instance.
Returns the current origin Request instance.
Details
at line line 41
__construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
Constructor.
in Client at line line 66
followRedirects(bool $followRedirect = true)
Sets whether to automatically follow redirects or not.
in Client at line line 76
bool
isFollowingRedirects()
Returns whether client automatically follows redirects or not.
in Client at line line 86
setMaxRedirects(int $maxRedirects)
Sets the maximum number of requests that crawler can follow.
in Client at line line 97
int
getMaxRedirects()
Returns the maximum number of requests that crawler can follow.
in Client at line line 109
insulate(bool $insulated = true)
Sets the insulated flag.
in Client at line line 123
setServerParameters(array $server)
Sets server parameters.
in Client at line line 137
setServerParameter(string $key, string $value)
Sets single server parameter.
in Client at line line 150
string
getServerParameter(string $key, string $default = '')
Gets single server parameter for specified key.
in Client at line line 190
Response|null
getInternalResponse()
Returns the current BrowserKit Response instance.
at line line 65
object|null
getResponse()
Returns the current origin response instance.
The origin response is the response instance that is returned by the code that handles requests.
in Client at line line 215
Request|null
getInternalRequest()
Returns the current BrowserKit Request instance.
at line line 55
object|null
getRequest()
Returns the current origin Request instance.
The origin request is the request instance that is sent to the code that handles requests.
in Client at line line 279
Crawler
request(string $method, string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, bool $changeHistory = true)
Calls a URI.
in Client at line line 513
restart()
Restarts the client.
It flushes history and all cookies.