function Fields::__construct
Same name in this branch
- 11.1.x vendor/ramsey/uuid/src/Guid/Fields.php \Ramsey\Uuid\Guid\Fields::__construct()
- 11.1.x vendor/ramsey/uuid/src/Rfc4122/Fields.php \Ramsey\Uuid\Rfc4122\Fields::__construct()
Parameters
string $bytes A 16-byte binary string representation of a UUID:
Throws
InvalidArgumentException if the byte string is not exactly 16 bytes
Overrides SerializableFieldsTrait::__construct
File
-
vendor/
ramsey/ uuid/ src/ Nonstandard/ Fields.php, line 55
Class
- Fields
- Nonstandard UUID fields do not conform to the RFC 4122 standard
Namespace
Ramsey\Uuid\NonstandardCode
public function __construct(string $bytes) {
if (strlen($this->bytes) !== 16) {
throw new InvalidArgumentException('The byte string must be 16 bytes long; ' . 'received ' . strlen($this->bytes) . ' bytes');
}
}