1 <?php
2
3 namespace PayPal\Exception;
4
5 /**
6 * Class PayPalConnectionException
7 *
8 * @package PayPal\Exception
9 */
10 class PayPalConnectionException extends \Exception
11 {
12 /**
13 * The url that was being connected to when the exception occured
14 *
15 * @var string
16 */
17 private $url;
18
19 /**
20 * Any response data that was returned by the server
21 *
22 * @var string
23 */
24 private $data;
25
26 /**
27 * Default Constructor
28 *
29 * @param string $url
30 * @param string $message
31 * @param int $code
32 */
33 public function __construct($url, $message, $code = 0)
34 {
35 parent::__construct($message, $code);
36 $this->url = $url;
37 }
38
39 /**
40 * Sets Data
41 *
42 * @param $data
43 */
44 public function setData($data)
45 {
46 $this->data = $data;
47 }
48
49 /**
50 * Gets Data
51 *
52 * @return string
53 */
54 public function getData()
55 {
56 return $this->data;
57 }
58
59 /**
60 * Gets Url
61 *
62 * @return string
63 */
64 public function getUrl()
65 {
66 return $this->url;
67 }
68 }
69