PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / trunk
WCPOS – Point of Sale (POS) plugin for WooCommerce vtrunk
1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 1.9.13 1.9.12 1.9.11 1.9.10 All 159 releases
woocommerce-pos / includes / API / V2 / Proxy / Proxy_Behavior.php

Proxy_Behavior.php in WCPOS – Point of Sale (POS) plugin for WooCommerce trunk, at includes/API/V2/Proxy/Proxy_Behavior.php

44 lines 954 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Per-resource catalog proxy contract.
4 *
5 * @package WCPOS\WooCommercePOS\API\V2\Proxy
6 */
7
8 namespace WCPOS\WooCommercePOS\API\V2\Proxy;
9
10 use WP_REST_Request;
11
12 /**
13 * Vary only the three resource-specific phases of a catalog proxy read.
14 */
15 interface Proxy_Behavior {
16 /**
17 * Adjust query parameters before forwarding them to wc/v3.
18 *
19 * @param array $params Query parameters to forward.
20 * @param WP_REST_Request $request Original proxy request.
21 *
22 * @return array
23 */
24 public function forwarded_params( array $params, WP_REST_Request $request ): array;
25
26 /**
27 * Install resource hooks around one forward and unwind them afterward.
28 *
29 * @param callable $forward Forward operation.
30 *
31 * @return mixed
32 */
33 public function around( callable $forward );
34
35 /**
36 * Apply resource-specific response shaping.
37 *
38 * @param mixed $data Response data.
39 *
40 * @return mixed
41 */
42 public function post_process( $data );
43 }
44