PluginProbe
Datafeedr API / 1.0.125
Datafeedr API v1.0.125
1.4.3 1.4.2 1.0.125 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.3 1.0.30 1.0.31 1.0.32 All 182 releases
datafeedr-api / Wuwei / Framework / Event / Subscriber_Interface.php

Subscriber_Interface.php in Datafeedr API 1.0.125, at Wuwei/Framework/Event/Subscriber_Interface.php

36 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace Datafeedr\Api\Wuwei\Event;
2
3 /**
4 * Interface Subscriber
5 *
6 * A Subscriber knows what specific WordPress events it wants to listen to.
7 *
8 * When an EventManager adds a Subscriber, it gets all the WordPress events that
9 * it wants to listen to. It then adds the subscriber as a listener for each of them.
10 *
11 * @since 2.0.0
12 *
13 * @link https://carlalexander.ca/design-system-wordpress-event-management/
14 */
15 interface Subscriber_Interface {
16
17 /**
18 * Returns an array of events that this subscriber wants to listen to.
19 *
20 * The array key is the event name. The value can be:
21 *
22 * * The method name
23 * * An array with the method name and priority
24 * * An array with the method name, priority and number of accepted arguments
25 *
26 * For instance:
27 *
28 * * array( 'hook_name' => 'method_name' )
29 * * array( 'hook_name' => array( 'method_name', $priority ) )
30 * * array( 'hook_name' => array( 'method_name', $priority, $accepted_args ) )
31 *
32 * @return array
33 */
34 public static function get_subscribed_events();
35 }
36