1 | <?php |
||
12 | class IpinfoResponse |
||
13 | { |
||
14 | const IP = 'ip'; |
||
15 | const HOSTNAME = 'hostname'; |
||
16 | const LOC = 'loc'; |
||
17 | const ORG = 'org'; |
||
18 | const CITY = 'city'; |
||
19 | const REGION = 'region'; |
||
20 | const COUNTRY = 'country'; |
||
21 | const PHONE = 'phone'; |
||
22 | const POSTAL = 'postal'; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * Contains all the properties of the host. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $properties; |
||
31 | |||
32 | /** |
||
33 | * Contains the status code ipInfo http response. |
||
34 | * @var integer |
||
35 | */ |
||
36 | protected $statusCode; |
||
37 | |||
38 | /** |
||
39 | * Create an IpinfoResponse object with all the properties. |
||
40 | * |
||
41 | * @param JsonResponse $response |
||
42 | */ |
||
43 | public function __construct(JsonResponse $response) |
||
61 | |||
62 | /** |
||
63 | * Get the city value. |
||
64 | */ |
||
65 | public function getCity() |
||
69 | |||
70 | /** |
||
71 | * Get the country value. |
||
72 | */ |
||
73 | public function getCountry() |
||
77 | |||
78 | /** |
||
79 | * Get the hostname value. |
||
80 | */ |
||
81 | public function getHostname() |
||
85 | |||
86 | /** |
||
87 | * Get the ip value. |
||
88 | */ |
||
89 | public function getIp() |
||
93 | |||
94 | /** |
||
95 | * Get the loc value. |
||
96 | */ |
||
97 | public function getLoc() |
||
101 | |||
102 | /** |
||
103 | * Get the org value. |
||
104 | */ |
||
105 | public function getOrg() |
||
109 | |||
110 | /** |
||
111 | * Get the phone value. |
||
112 | */ |
||
113 | public function getPhone() |
||
117 | |||
118 | /** |
||
119 | * Get the postal value. |
||
120 | */ |
||
121 | public function getPostal() |
||
125 | |||
126 | /** |
||
127 | * Get the region value. |
||
128 | */ |
||
129 | public function getRegion() |
||
133 | |||
134 | /** |
||
135 | * Get all the properties. |
||
136 | * |
||
137 | * @return array An associative array with all the properties. |
||
138 | */ |
||
139 | public function getProperties() |
||
143 | |||
144 | /** |
||
145 | * Get the status code ipinfo response. |
||
146 | * |
||
147 | * @return integer |
||
148 | */ |
||
149 | public function getStatusCode() |
||
153 | } |
||
154 |