/** * Check if the handler handles the * * @param MessageInterface $message * @return bool */ public function isHandling(MessageInterface $message) { if (is_array($this->types)) { return in_array($message->getType(), $this->types); } elseif (is_string($this->types)) { return $this->types == Notifier::TYPE_ALL; } return false; }
/** * Apply all logic to get the correct channels for the current recipient. * * @param MessageInterface $message * @param RecipientInterface $recipient * @return ChannelInterface[] */ private function getChannels(MessageInterface $message, RecipientInterface $recipient) { $channels = $this->channelResolver->getChannels($message->getType(), $this->getChannelStore()); return $this->channelResolver->filterChannels($recipient, $message->getType(), $channels); }