Example #1
0
 /**
  * @param string $name
  * @param ChannelProtocolInterface $protocol
  * @return bool
  */
 public function __invoke($name, ChannelProtocolInterface $protocol)
 {
     return StringSupport::match($this->name, $protocol->getDestination());
 }
Example #2
0
 /**
  * @param string $name
  * @param string|ChannelProtocolInterface $message
  * @param int $flags
  * @return bool
  */
 protected function handleSendAsync($name, $message, $flags = Channel::MODE_DEFAULT)
 {
     if ($message->getType() === '') {
         $message->setType(Channel::TYPE_SND);
     }
     if ($message->getDestination() === '') {
         $message->setDestination($name);
     }
     return $this->output()->handle($name, $message, $flags);
 }