| 1 |
<?php |
| 2 |
/** |
| 3 |
* Event Management: Subscriber interface |
| 4 |
* |
| 5 |
* @package SimplePay |
| 6 |
* @subpackage Core |
| 7 |
* @copyright Copyright (c) 2022, Sandhills Development, LLC |
| 8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @since 4.4.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
namespace SimplePay\Core\EventManagement; |
| 13 |
|
| 14 |
/** |
| 15 |
* SubscriberInterface interface. |
| 16 |
* |
| 17 |
* @since 4.4.0 |
| 18 |
*/ |
| 19 |
interface SubscriberInterface { |
| 20 |
|
| 21 |
/** |
| 22 |
* Returns an array of events that this subscriber is listening to. |
| 23 |
* |
| 24 |
* The array key is the event (hook/filter) name. |
| 25 |
* The value can be: |
| 26 |
* |
| 27 |
* * The method name |
| 28 |
* * An array with the method name and priority |
| 29 |
* * An array with the method name, priority and number of accepted arguments |
| 30 |
* |
| 31 |
* Example: |
| 32 |
* |
| 33 |
* array( 'hook_name' => 'method_name' ) |
| 34 |
* array( 'hook_name' => array( 'method_name', $priority ) ) |
| 35 |
* array( 'hook_name' => array( 'method_name', $priority, $accepted_args ) ) |
| 36 |
* array( 'hook_name' => array( |
| 37 |
* array( 'method_name_1', $priority_1, $accepted_args_1 ) ), |
| 38 |
* array( 'method_name_2', $priority_2, $accepted_args_2 ) ) |
| 39 |
* ) |
| 40 |
* |
| 41 |
* @since 4.4.0 |
| 42 |
* |
| 43 |
* @return array<mixed> |
| 44 |
*/ |
| 45 |
public function get_subscribed_events(); |
| 46 |
|
| 47 |
} |
| 48 |
|