PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / src / API / REST / V3 / Routes / Subscriptions / Exceptions / SubscriptionValidationException.php

SubscriptionValidationException.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/API/REST/V3/Routes/Subscriptions/Exceptions/SubscriptionValidationException.php

62 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\API\REST\V3\Routes\Subscriptions\Exceptions;
4
5 use Exception;
6
7 /**
8 * @since 4.8.0
9 */
10 class SubscriptionValidationException extends Exception
11 {
12 /**
13 * @var string
14 */
15 private $errorCode;
16
17 /**
18 * @var int
19 */
20 private $statusCode;
21
22 /**
23 * @since 4.17.0 Declare the nullable parameter explicitly.
24 * @since 4.8.0
25 *
26 * @param string $message
27 * @param string $errorCode
28 * @param int $statusCode
29 * @param Exception|null $previous
30 */
31 public function __construct(string $message, string $errorCode, int $statusCode = 400, ?Exception $previous = null)
32 {
33 parent::__construct($message, 0, $previous);
34 $this->errorCode = $errorCode;
35 $this->statusCode = $statusCode;
36 }
37
38 /**
39 * Get the error code
40 *
41 * @since 4.8.0
42 *
43 * @return string
44 */
45 public function getErrorCode(): string
46 {
47 return $this->errorCode;
48 }
49
50 /**
51 * Get the HTTP status code
52 *
53 * @since 4.8.0
54 *
55 * @return int
56 */
57 public function getStatusCode(): int
58 {
59 return $this->statusCode;
60 }
61 }
62