# imagify/trunk/inc/classes/Dependencies/wp-media/event-manager/SubscriberInterface.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version trunk. 33 lines.

- Page: https://pluginprobe.com/plugins/imagify/trunk/code/inc/classes/Dependencies/wp-media/event-manager/SubscriberInterface.php
- Raw: https://pluginprobe.com/plugins/imagify/trunk/raw/inc/classes/Dependencies/wp-media/event-manager/SubscriberInterface.php
- Modified: 2024-03-06T17:27:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/trunk/code/inc/classes/Dependencies/wp-media/event-manager/SubscriberInterface.php#L10-L20`.

```php
<?php
namespace Imagify\EventManagement;

/**
 * A Subscriber knows what specific WordPress events it wants to listen to.
 *
 * When an EventManager adds a Subscriber, it gets all the WordPress events that
 * it wants to listen to. It then adds the subscriber as a listener for each of them.
 *
 * @author Carl Alexander <contact@carlalexander.ca>
 */
interface SubscriberInterface {
	/**
	 * Returns an array of events that this subscriber wants to listen to.
	 *
	 * The array key is the event name. The value can be:
	 *
	 *  * The method name
	 *  * An array with the method name and priority
	 *  * An array with the method name, priority and number of accepted arguments
	 *
	 * For instance:
	 *
	 *  * array('hook_name' => 'method_name')
	 *  * array('hook_name' => array('method_name', $priority))
	 *  * array('hook_name' => array('method_name', $priority, $accepted_args))
	 *  * array('hook_name' => array(array('method_name_1', $priority_1, $accepted_args_1)), array('method_name_2', $priority_2, $accepted_args_2)))
	 *
	 * @return array
	 */
	public static function get_subscribed_events();
}

```
