return 1;
} $dispatcher =
$this->dispatchers->
get($dispatcherServiceName);
if ($event =
$input->
getArgument('event'
)) { if ($dispatcher->
hasListeners($event)) { $options =
['event' =>
$event];
} else { // if there is no direct match, try find partial matches
$events =
$this->
searchForEvent($dispatcher,
$event);
if (0 === \
count($events)) { $io->
getErrorStyle()->
warning(sprintf('The event "%s" does not have any registered listeners.',
$event));
return 0;
} elseif (1 === \
count($events)) { $options =
['event' =>
$events[array_key_first($events)]];
} else { $options =
['events' =>
$events];
} } }