Builder_Interface.php
54 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Pods\REST\Interfaces\Swagger; |
| 4 | |
| 5 | // Don't load directly. |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | die( '-1' ); |
| 8 | } |
| 9 | |
| 10 | use Pods\REST\Interfaces\Endpoints\READ_Interface; |
| 11 | |
| 12 | /** |
| 13 | * Provider interface. |
| 14 | * |
| 15 | * @credit The Events Calendar team - https://github.com/the-events-calendar/tribe-common |
| 16 | * |
| 17 | * @since 3.0 |
| 18 | */ |
| 19 | interface Builder_Interface { |
| 20 | /** |
| 21 | * Registers a documentation provider for a path. |
| 22 | * |
| 23 | * @since 3.0 |
| 24 | * |
| 25 | * @param string $path |
| 26 | * @param READ_Interface $endpoint |
| 27 | */ |
| 28 | public function register_documentation_provider( $path, Provider_Interface $endpoint ); |
| 29 | |
| 30 | /** |
| 31 | * @since 3.0 |
| 32 | * |
| 33 | * @return Provider_Interface[] |
| 34 | */ |
| 35 | public function get_registered_documentation_providers(); |
| 36 | |
| 37 | /** |
| 38 | * Registers a documentation provider for a definition. |
| 39 | * |
| 40 | * @since 3.0 |
| 41 | * |
| 42 | * @param string $type |
| 43 | * @param Provider_Interface $provider |
| 44 | */ |
| 45 | public function register_definition_provider( $type, Provider_Interface $provider ); |
| 46 | |
| 47 | /** |
| 48 | * @since 3.0 |
| 49 | * |
| 50 | * @return Provider_Interface[] |
| 51 | */ |
| 52 | public function get_registered_definition_providers(); |
| 53 | } |
| 54 |