Documentation

VariantTrait

Provides common functionality for handling the variant, as defined by RFC 4122

Tags
psalm-immutable

Table of Contents

getBytes()  : string
Returns the bytes that comprise the fields
getVariant()  : int
Returns the variant identifier, according to RFC 4122, for the given bytes

Methods

getBytes()

Returns the bytes that comprise the fields

public abstract getBytes() : string
Return values
string

getVariant()

Returns the variant identifier, according to RFC 4122, for the given bytes

public getVariant() : int

The following values may be returned:

  • 0 -- Reserved, NCS backward compatibility.
  • 2 -- The variant specified in RFC 4122.
  • 6 -- Reserved, Microsoft Corporation backward compatibility.
  • 7 -- Reserved for future definition.
Tags
link

RFC 4122, § 4.1.1: Variant

Return values
int

The variant identifier, according to RFC 4122

Search results