31 private float $amount,
32 private int $operation,
34 private bool $serializable
37 public function getId() : string{ return $this->id; }
39 public function getName() : string{ return $this->name; }
41 public function getAmount() : float{ return $this->amount; }
43 public function getOperation() : int{ return $this->operation; }
45 public function getOperand() : int{ return $this->operand; }
47 public function isSerializable() : bool{ return $this->serializable; }
49 public static function read(ByteBufferReader $in) : self{
50 $id = CommonTypes::getString($in);
51 $name = CommonTypes::getString($in);
52 $amount = LE::readFloat($in);
53 $operation = LE::readSignedInt($in);
54 $operand = LE::readSignedInt($in);
55 $serializable = CommonTypes::getBool($in);
57 return new self($id, $name, $amount, $operation, $operand, $serializable);
60 public function write(ByteBufferWriter $out) : void{
61 CommonTypes::putString($out, $this->
id);
62 CommonTypes::putString($out, $this->name);
63 LE::writeFloat($out, $this->amount);
64 LE::writeSignedInt($out, $this->operation);
65 LE::writeSignedInt($out, $this->operand);
66 CommonTypes::putBool($out, $this->serializable);