On Mon, Aug 20, 2018 at 10:16 AM <designc...@gmail.com> wrote:
>
> Right. In that case, the string $eventName would have to be a fully qualified 
> event class name (including the namespace) for the emitter to pick it up 
> correctly. Isn't that a bit impractical? Or should we just be looking at the 
> event name and stripping off the namespace (in emitter) like maybe by doing 
> something like:
>
> $eventName = end(explode('\\', get_class($command)));

I don't think it is impractical at all. Mapping by full class name is
very easy with `Foo::class` and FQCN prevents duplicate errors, eg:

Acme\Domain\Task\UpdatedEvent
Acme\Domain\User\UpdatedEvent

--
Woody Gilk
https://shadowhand.me

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAGOJM6KFJP4Ox7XWv389MxhX6Ah6mSGJWVPO9VKxrrW1RRyhag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to