-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSupportsRedirectsInterface.php
45 lines (39 loc) · 1.37 KB
/
SupportsRedirectsInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace Radiergummi\Wander\Interfaces\Features;
use RangeException;
interface SupportsRedirectsInterface
{
/**
* Configures the client to follow redirects.
*
* @param bool $followRedirects
*/
public function followRedirects(bool $followRedirects): void;
/**
* Checks whether the client is configured to follow redirects.
*
* @return bool
*/
public function isFollowRedirectsEnabled(): bool;
/**
* Sets the maximum number of redirects the driver will follow before
* aborting the request. This setting has no effect if the driver is not
* configured to follow redirects in the first place.
* If the driver should not impose an upper limit on the number of redirects
* followed, this must be set to `NULL`.
*
* @param int|null $maximumRedirects Maximum number of redirects to follow.
*
* @throws RangeException If the number of redirects is negative.
*/
public function setMaximumRedirects(?int $maximumRedirects): void;
/**
* Retrieves the maximum number of redirects the driver will follow before
* aborting the request. If the driver will not follow any redirects or if
* it is configured to not have an upper limit on redirects, `NULL` must be
* returned.
*
* @return int|null
*/
public function getMaximumRedirects(): ?int;
}