code: public function setListener($event, $service, $method = null, $priority = 0)
      {
          if (is_int($method)) {
              $priority = $method;
              $method = null;
          }
  
          $name = uniqid();
  
          $this->listenerSpecs[$name] = [
              'event' => $event,
              'service' => $service,
              'method' => $method,
              'priority' => $priority,
              'instance' => null,
          ];
  
          return $this;
      }
docs: Adds a listener specification.
  
  @param string     $event
  @param string     $service
  @param null|string|int $method
  @param int  $priority
  
  @return self
  @since 0.25