23 use GetTypeIdFromConstTrait;
25 public const ID = EntityMetadataTypes::STRING;
27 public function __construct(
31 public function getValue() :
string{
return $this->value; }
33 public static function read(ByteBufferReader $in) :
self{
34 return new self(CommonTypes::getString($in));
37 public function write(ByteBufferWriter $out) :
void{
38 CommonTypes::putString($out, $this->value);
42 return $other instanceof
self and $other->value === $this->value;