if ($envelope->
all(TransportNamesStamp::
class)) { foreach ($envelope->
last(TransportNamesStamp::
class)->
getTransportNames() as $senderAlias) { yield from $this->
getSenderFromAlias($senderAlias);
} return;
} $seen =
[];
foreach (HandlersLocator::
listTypes($envelope) as $type) { foreach ($this->sendersMap
[$type] ??
[] as $senderAlias) { if (str_ends_with($type, '*'
) &&
$seen) { // the '*' acts as a fallback, if other senders already matched
// with previous types, skip the senders bound to the fallback
continue;
} if (!\
in_array($senderAlias,
$seen, true
)) { $seen[] =
$senderAlias;
yield from $this->
getSenderFromAlias($senderAlias);
}