src/Panda/Events/Event.php
public function dispatch()
    {
        foreach ($this->getSubscribers() as $channelIdentifier => $subscribers) {
            // Get channel from ChannelFactory
            $channel = $this->getChannelFactory()->getChannel($channelIdentifier);

            // Get proper message for the given channel
            $message = $this->getMessage($channel);

            // Decorate message
            $message = $this->decorate($message, $channel);

            // Dispatch to all subscribers
            /** @var SubscriberInterface $subscriber */
            foreach ($subscribers as $subscriber) {
                // Decorate the message
                $message->decorate();

                // Dispatch to the subscriber
                $channel->dispatch($subscriber, $message);
            }
        }
    }
public function dispatch()
    {
        foreach ($this->getSubscribers() as $channelIdentifier => $subscribers) {
            // Get channel from ChannelFactory
            $channel = $this->getChannelFactory()->getChannel($channelIdentifier);

            // Get proper message for the given channel
            $message = $this->getMessage($channel);

            // Decorate message
            $message = $this->decorate($message, $channel);

            // Dispatch to all subscribers
            /** @var SubscriberInterface $subscriber */
            foreach ($subscribers as $subscriber) {
                // Decorate the message
                $message->decorate();

                // Dispatch to the subscriber
                $channel->dispatch($subscriber, $message);
            }
        }
    }
public function dispatch ( ) { foreach ( $ this -> getSubscribers ( ) as $ channelIdentifier => $ subscribers ) { // Get channel from ChannelFactory $ channel = $ this -> getChannelFactory ( ) -> getChannel ( $ channelIdentifier ) ; // Get proper message for the given channel $ message = $ this -> getMessage ( $ channel ) ; // Decorate message $ message = $ this -> decorate ( $ message , $ channel ) ; // Dispatch to all subscribers /** @var SubscriberInterface $subscriber */ foreach ( $ subscribers as $ subscriber ) { // Decorate the message $ message -> decorate ( ) ; // Dispatch to the subscriber $ channel -> dispatch ( $ subscriber , $ message ) ; } } }
Dispatch the event to its subscribers through the subscribed channels.

@throws Exceptions\MessageNotSupportedException
Dispatch the event to its subscribers through the subscribed channels .