<?php
/**
 * Event Subscriber Interface
 *
 * Defines the contract for event subscribers in the event system.
 *
 * @package     WPUltimateSecurity\UltimateSecurity\Contracts
 * @since       2.0.0
 */

declare(strict_types=1);

namespace WPUltimateSecurity\UltimateSecurity\Contracts;

/**
 * Contract for event subscribers.
 *
 * Event subscribers declare which events they want to listen to
 * and which methods should handle those events.
 *
 * @since 2.0.0
 */
interface EventSubscriberInterface
{
    /**
     * Get the events this subscriber wants to listen to.
     *
     * Returns an array mapping event names to handler methods.
     * The handler methods must be public methods on the implementing class.
     *
     * Example return value:
     * ```php
     * return [
     *     'user.login'          => 'onUserLogin',
     *     'user.logout'         => 'onUserLogout',
     *     'security.lockout'    => 'onSecurityLockout',
     * ];
     * ```
     *
     * For priority support, return an array with method and priority:
     * ```php
     * return [
     *     'user.login' => ['onUserLogin', 10],
     * ];
     * ```
     *
     * @since 2.0.0
     *
     * @return array<string, string|array{0: string, 1: int}> Event name to handler method mapping.
     */
    public function getSubscribedEvents(): array;
}
