IntegrationInterface.php
68 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Integrations\Contracts; |
| 4 | |
| 5 | interface IntegrationInterface { |
| 6 | /** |
| 7 | * Get the slug for the integration. |
| 8 | * |
| 9 | * @return string |
| 10 | */ |
| 11 | public function getName(); |
| 12 | |
| 13 | /** |
| 14 | * Get the model for the integration. |
| 15 | * |
| 16 | * @return string |
| 17 | */ |
| 18 | public function getModel(); |
| 19 | |
| 20 | /** |
| 21 | * Get the logo for the integration. |
| 22 | * |
| 23 | * @return string |
| 24 | */ |
| 25 | public function getLogo(); |
| 26 | |
| 27 | /** |
| 28 | * Get the name for the integration. |
| 29 | * |
| 30 | * @return string |
| 31 | */ |
| 32 | public function getLabel(); |
| 33 | |
| 34 | /** |
| 35 | * Get the item label for the integration. |
| 36 | * |
| 37 | * @return string |
| 38 | */ |
| 39 | public function getItemLabel(); |
| 40 | |
| 41 | /** |
| 42 | * Get the item help label for the integration. |
| 43 | * |
| 44 | * @return string |
| 45 | */ |
| 46 | public function getItemHelp(); |
| 47 | |
| 48 | /** |
| 49 | * Get item listing for the integration. |
| 50 | * |
| 51 | * @param array $items The integration items. |
| 52 | * @param string $search The search term. |
| 53 | * |
| 54 | * @return array The items for the integration. |
| 55 | */ |
| 56 | public function getItems( $items = [], $search = '' ); |
| 57 | |
| 58 | /** |
| 59 | * Get the individual item. |
| 60 | * |
| 61 | * @param string $item The item record. |
| 62 | * @param string $id Id for the record. |
| 63 | * |
| 64 | * @return array The item for the integration. |
| 65 | */ |
| 66 | public function getItem( $id ); |
| 67 | } |
| 68 |