1 | <?php |
||
20 | class ApiException extends Exception |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @internal |
||
25 | * @param RequestException $e |
||
26 | * @return AccessDeniedException|ApiException|AuthenticationException|ConflictingStateException| |
||
27 | * MethodNotAllowedException|NotFoundException|RateLimitExceededException|UnsupportedAcceptHeaderException| |
||
28 | * UnsupportedContentTypeException|ValidationException |
||
29 | */ |
||
30 | static function create(RequestException $e) { |
||
54 | |||
55 | /** |
||
56 | * @var RequestException |
||
57 | * @internal |
||
58 | */ |
||
59 | private $exception; |
||
60 | |||
61 | /** |
||
62 | * Returns the Request Exception |
||
63 | * |
||
64 | * A Guzzle Request Exception is returned |
||
65 | * |
||
66 | * @return RequestException |
||
67 | */ |
||
68 | public function getRequestException() |
||
72 | |||
73 | /** |
||
74 | * Exception constructor |
||
75 | * |
||
76 | * Constructs a new exception. |
||
77 | * |
||
78 | * @param RequestException $e |
||
79 | * @internal |
||
80 | */ |
||
81 | public function __construct(RequestException $e) |
||
86 | } |
||
87 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.