trait MaxTrait
Provides common functionality for max UUIDs
The max UUID is special form of UUID that is specified to have all 128 bits set to one. It is the inverse of the nil UUID.
@link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#… Max UUID
@psalm-immutable
Hierarchy
- trait \Ramsey\Uuid\Rfc4122\MaxTrait
1 file declares its use of MaxTrait
- Fields.php in vendor/
ramsey/ uuid/ src/ Guid/ Fields.php
File
-
vendor/
ramsey/ uuid/ src/ Rfc4122/ MaxTrait.php, line 27
Namespace
Ramsey\Uuid\Rfc4122View source
trait MaxTrait {
/**
* Returns the bytes that comprise the fields
*/
public abstract function getBytes() : string;
/**
* Returns true if the byte string represents a max UUID
*/
public function isMax() : bool {
return $this->getBytes() === "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
MaxTrait::getBytes | abstract public | function | Returns the bytes that comprise the fields | 2 |
MaxTrait::isMax | public | function | Returns true if the byte string represents a max UUID |