src/Application/Messaging/Event/ServiceAwareEventDispatcher.php
public function addHandlerService(string $eventType, string $serviceId, string $method, int $priority = 0): void
    {
        if (!isset($this->serviceIds[$eventType])) {
            $this->serviceIds[$eventType] = [];
        }

        $this->serviceIds[$eventType][] = [$serviceId, $method, $priority];
    }
public function addHandlerService(string $eventType, string $serviceId, string $method, int $priority = 0): void
    {
        if (!isset($this->serviceIds[$eventType])) {
            $this->serviceIds[$eventType] = [];
        }

        $this->serviceIds[$eventType][] = [$serviceId, $method, $priority];
    }
public function addHandlerService ( string $ eventType , string $ serviceId , string $ method , int $ priority = 0 ) : void { if ( ! isset ( $ this -> serviceIds [ $ eventType ] ) ) { $ this -> serviceIds [ $ eventType ] = [ ] ; } $ this -> serviceIds [ $ eventType ] [ ] = [ $ serviceId , $ method , $ priority ] ; }
Adds a handler service for a specific event

@param string $eventType The event type
@param string $serviceId The handler service ID
@param string $method    The name of the method to invoke
@param int    $priority  Higher priority handlers are called first

@return void
Adds a handler service for a specific event