BaseIntegration.php
2 weeks ago
IntegrationInterface.php
2 weeks ago
IntegrationManager.php
2 weeks ago
MemberPressIntegration.php
2 weeks ago
WooCommerceIntegration.php
2 weeks ago
IntegrationInterface.php
78 lines
| 1 | <?php |
| 2 | |
| 3 | namespace LLAR\Core\Integrations; |
| 4 | |
| 5 | if ( ! defined( 'ABSPATH' ) ) { |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | interface IntegrationInterface { |
| 10 | |
| 11 | /** |
| 12 | * Get the name of the plugin this integration supports |
| 13 | * |
| 14 | * @return string |
| 15 | */ |
| 16 | public function get_plugin_name(); |
| 17 | |
| 18 | /** |
| 19 | * Register all hooks and filters for this integration |
| 20 | * |
| 21 | * @return void |
| 22 | */ |
| 23 | public function register_hooks(); |
| 24 | |
| 25 | /** |
| 26 | * Check if this is the plugin's login page |
| 27 | * |
| 28 | * @return bool |
| 29 | */ |
| 30 | public function is_login_page(); |
| 31 | |
| 32 | /** |
| 33 | * Get login credentials from the request |
| 34 | * Should return array with 'username' and 'password' keys |
| 35 | * |
| 36 | * @return array|null |
| 37 | */ |
| 38 | public function get_login_credentials(); |
| 39 | |
| 40 | /** |
| 41 | * Get login identifier used by current integration for auth flow (username/email). |
| 42 | * |
| 43 | * @return string |
| 44 | */ |
| 45 | public function get_login_identifier(); |
| 46 | |
| 47 | /** |
| 48 | * Display error message on login page |
| 49 | * |
| 50 | * @param string $message Error message |
| 51 | * @return void |
| 52 | */ |
| 53 | public function display_error( $message ); |
| 54 | |
| 55 | /** |
| 56 | * Check if this is the plugin's registration page |
| 57 | * |
| 58 | * @return bool |
| 59 | */ |
| 60 | public function is_registration_page(); |
| 61 | |
| 62 | /** |
| 63 | * Get registration data from the request |
| 64 | * Should return array with 'username' and 'email' keys |
| 65 | * |
| 66 | * @return array|null |
| 67 | */ |
| 68 | public function get_registration_data(); |
| 69 | |
| 70 | /** |
| 71 | * Display error message on registration page |
| 72 | * |
| 73 | * @param string $message Error message |
| 74 | * @return void |
| 75 | */ |
| 76 | public function display_registration_error( $message ); |
| 77 | } |
| 78 |