PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v1.4.5
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / vendor / wpfluent / framework / src / WPFluent / Response / Response.php

Response.php in Fluent Support – Helpdesk & Customer Support Ticket System 1.4.5, at vendor/wpfluent/framework/src/WPFluent/Response/Response.php

38 lines 748 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentSupport\Framework\Response;
4
5 class Response
6 {
7 protected $app = null;
8
9 public function __construct($app)
10 {
11 $this->app = $app;
12 }
13
14 public function json($data = null, $code = 200)
15 {
16 nocache_headers();
17 wp_send_json($data, $code);
18 }
19
20 public function send($data = null, $code = 200)
21 {
22 nocache_headers();
23 return new \WP_REST_Response($data, $code);
24 }
25
26 public function sendSuccess($data = null, $code = 200)
27 {
28 nocache_headers();
29 return new \WP_REST_Response($data, $code);
30 }
31
32 public function sendError($data = null, $code = 423)
33 {
34 nocache_headers();
35 return new \WP_REST_Response($data, $code);
36 }
37 }
38