<?php
declare(strict_types=1);

namespace CloudXM\SDK\Contracts;

interface EventDispatcherInterface
{
    /**
     * Dispatch an event to all registered listeners
     */
    public function dispatch(object $event): object;

    /**
     * Add an event listener for a specific event class
     */
    public function addListener(string $eventClass, callable $listener): void;

    /**
     * Remove an event listener
     */
    public function removeListener(string $eventClass, callable $listener): void;
}