1 | <?php |
||
21 | class GumroadIdentityProviderException extends IdentityProviderException |
||
22 | { |
||
23 | /** |
||
24 | * Creates client exception from response. |
||
25 | * |
||
26 | * @param ResponseInterface $response Response received from upstream |
||
27 | * @param mixed $data Parsed response data |
||
28 | * @return IdentityProviderException |
||
29 | */ |
||
30 | 3 | public static function clientException(ResponseInterface $response, $data) |
|
37 | |||
38 | /** |
||
39 | * Creates oauth exception from response. |
||
40 | * |
||
41 | * @param ResponseInterface $response Response received from upstream |
||
42 | * @param string $data Parsed response data |
||
43 | * @return IdentityProviderException |
||
44 | */ |
||
45 | 3 | public static function oauthException(ResponseInterface $response, $data) |
|
52 | |||
53 | /** |
||
54 | * Creates identity exception from response. |
||
55 | * |
||
56 | * @param ResponseInterface $response Response received from upstream |
||
57 | * @param string|null $message Parsed message |
||
58 | * @return IdentityProviderException |
||
59 | */ |
||
60 | 6 | protected static function fromResponse(ResponseInterface $response, $message = null) |
|
64 | } |
||
65 |