PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | vendor/wpfluent/framework/src/WPFluent/Http/Response.php +13 -2 1.0.922.11.0 View file →
@@ -7,9 +7,9 @@
7 7 *
8 8 * Handles HTTP responses for HTTP Client class,
9 9 * providing methods to access response data.
10 10 */
11 -class Response
11 +class Response implements \JsonSerializable
12 12 {
13 13 /**
14 14 * The HTTP response data.
15 15 *
@@ -37,8 +37,19 @@
37 37 return $this->response;
38 38 }
39 39
40 40 /**
41 + * Convert the response object to an array.
42 + *
43 + * @return array
44 + */
45 + #[\ReturnTypeWillChange]
46 + public function jsonSerialize()
47 + {
48 + return $this->toArray();
49 + }
50 +
51 + /**
41 52 * Get the HTTP response object.
42 53 *
43 54 * @return mixed
44 55 */
@@ -77,9 +88,9 @@
77 88
78 89 /**
79 90 * Throw an exception based on the response status code.
80 91 *
81 - * @throws \WpOrg\Requests\Exception\Http\Status
92 + * @throws \WpOrg\Requests\Exception
82 93 */
83 94 public function throw()
84 95 {
85 96 $class = sprintf(