| 1 |
<?php |
| 2 |
/** |
| 3 |
* Provider contract for independent template-driven catalogs. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
* @since 11.6.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
/** |
| 14 |
* Supply normalized responses for one registered catalog. |
| 15 |
* |
| 16 |
* Providers own domain authorization and data retrieval. The shared catalog |
| 17 |
* boundary owns only registration, shared request mechanics, and normalized |
| 18 |
* response validation. |
| 19 |
*/ |
| 20 |
interface WPBC_UI_Catalog_Provider { |
| 21 |
|
| 22 |
/** |
| 23 |
* Return the stable catalog identifier served by this provider. |
| 24 |
* |
| 25 |
* @return string Stable catalog identifier. |
| 26 |
*/ |
| 27 |
public function get_catalog_id(); |
| 28 |
|
| 29 |
/** |
| 30 |
* Build a response for one validated shared request. |
| 31 |
* |
| 32 |
* @param WPBC_UI_Catalog_Request $request Validated shared request. |
| 33 |
* |
| 34 |
* @return WPBC_UI_Catalog_Response|WP_Error Normalized response or safe error. |
| 35 |
*/ |
| 36 |
public function get_response( $request ); |
| 37 |
} |
| 38 |
|