PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.3
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.3
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / vendor / wpfluent / framework / src / WPFluent / Response / Response.php

Response.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.3, at vendor/wpfluent/framework/src/WPFluent/Response/Response.php

34 lines 646 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\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 return wp_send_json($data, $code);
17 }
18
19 public function send($data = null, $code = 200)
20 {
21 return new \WP_REST_Response($data, $code);
22 }
23
24 public function sendSuccess($data = null, $code = 200)
25 {
26 return new \WP_REST_Response($data, $code);
27 }
28
29 public function sendError($data = null, $code = 422)
30 {
31 return new \WP_REST_Response($data, $code);
32 }
33 }
34