PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / trunk
WCPOS – Point of Sale (POS) plugin for WooCommerce vtrunk
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 1.9.9 All 158 releases
woocommerce-pos / includes / Interfaces / Provider_Adapter_Interface.php

Provider_Adapter_Interface.php in WCPOS – Point of Sale (POS) plugin for WooCommerce trunk, at includes/Interfaces/Provider_Adapter_Interface.php

50 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Cloud-print provider adapter interface.
4 *
5 * @package WCPOS\WooCommercePOS\Interfaces
6 */
7
8 namespace WCPOS\WooCommercePOS\Interfaces;
9
10 /**
11 * Provider_Adapter_Interface interface.
12 */
13 interface Provider_Adapter_Interface {
14 /**
15 * Return the provider's default job content type.
16 *
17 * @return string
18 */
19 public function content_type(): string;
20
21 /**
22 * Resolve a template to the provider's wire format and content type.
23 *
24 * @param array $printer Printer configuration.
25 * @param array $template Template configuration.
26 *
27 * @return array{kind:string, content_type:string}
28 */
29 public function format( array $printer, array $template ): array;
30
31 /**
32 * Build a base64-encoded provider diagnostic.
33 *
34 * @param string $printer_name Printer display name.
35 *
36 * @return array{content_type:string, payload:string}
37 */
38 public function diagnostic( string $printer_name ): array;
39
40 /**
41 * Resolve provider status from printer data and plain runtime context.
42 *
43 * @param array $printer Printer configuration.
44 * @param array $context Runtime status context.
45 *
46 * @return string
47 */
48 public function status( array $printer, array $context ): string;
49 }
50