PluginProbe ʕ •ᴥ•ʔ
Backup Migration / 2.1.7
Backup Migration v2.1.7
2.1.7 2.1.6 2.1.5.2 trunk 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.6.1 1.4.7 1.4.8 1.4.9 1.4.9.1 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.5.1
backup-backup / analyst / src / ApiResponse.php
backup-backup / analyst / src Last commit date
Account 2 weeks ago Cache 2 weeks ago Contracts 2 weeks ago Core 2 weeks ago Http 2 weeks ago Notices 2 weeks ago Storage 2 weeks ago Analyst.php 2 weeks ago ApiRequestor.php 2 weeks ago ApiResponse.php 2 weeks ago Collector.php 2 weeks ago Mutator.php 2 weeks ago helpers.php 2 weeks ago
ApiResponse.php
45 lines
1 <?php
2
3 namespace Analyst;
4
5 class ApiResponse
6 {
7 /**
8 * Response headers
9 *
10 * @var array
11 */
12 public $headers;
13
14 /**
15 * Response body
16 *
17 * @var mixed
18 */
19 public $body;
20
21 /**
22 * Status code
23 *
24 * @var string
25 */
26 public $code;
27
28 public function __construct($body, $code, $headers)
29 {
30 $this->body = $body;
31 $this->code = $code;
32 $this->headers = $headers;
33 }
34
35 /**
36 * Whether status code is successful
37 *
38 * @return bool
39 */
40 public function isSuccess()
41 {
42 return $this->code >= 200 && $this->code < 300;
43 }
44 }
45