with() публичный Метод

Set protocol to be encoded or data decoded into.
public with ( Kraken\Channel\Protocol\ProtocolInterface $protocol ) : Kraken\Channel\Encoder\EncoderInterface
$protocol Kraken\Channel\Protocol\ProtocolInterface
Результат Kraken\Channel\Encoder\EncoderInterface
Пример #1
0
 /**
  * @override
  * @inheritDoc
  */
 public function handleReceive($sender, $multipartMessage)
 {
     $protocol = $this->encoder->with(new Protocol())->decode(implode('', $multipartMessage));
     if ($this->handleReceiveRequest($protocol)) {
         return;
     }
     if ($this->handleReceiveResponse($protocol) || $this->getInput()->handle($sender, $protocol)) {
         return;
     }
 }