protected createMessageProtocol ( Kraken\Channel\Protocol\ProtocolInterface | null | string | string[] $message ) : Kraken\Channel\Protocol\ProtocolInterface | ||
$message | Kraken\Channel\Protocol\ProtocolInterface | null | string | string[] | |
Результат | Kraken\Channel\Protocol\ProtocolInterface |
protected function createMessageProtocol($message)
{
if (!$message instanceof ProtocolInterface) {
$message = $this->createProtocol($message);
}
if ($message->getPid() === '') {
$message->setPid($this->genID());
}
if ($message->getTimestamp() == 0) {
$message->setTimestamp($this->getTime());
}
return $message;
}