38 if (!is_string(
$type)) {
39 throw new \InvalidArgumentException();
43 throw new \InvalidArgumentException();
58 parent::serialize($encoder);
59 $encoder->encodeString($this->type);
60 $encoder->encodeBoolean($this->wantReply);
82 throw new \RuntimeException();
87 $reflector = new \ReflectionClass(get_called_class());
90 $decoder->decodeUint32(),
91 $decoder->decodeString(),
92 $decoder->decodeBoolean()
94 static::unserializeSub($decoder)
96 return $reflector->newInstanceArgs($args);
$channel
Local channel identifier.
$wantReply
Whether the sender of the message wants a reply or not.
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
__construct($channel, $type, $wantReply)
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
static unserializeSub(\fpoirotte\Pssht\Wire\Decoder $decoder)