This file is part of the ramsey/uuid library
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
- Copyright
- Copyright (c) Ben Ramsey ben@b.nosp@m.enra.nosp@m.msey..nosp@m.com http://opensource.org/licenses/MIT MIT Documentation https://packagist.org/packages/ramsey/uuid Packagist https://github.com/ramsey/uuid GitHub This file is part of the ramsey/uuid library For the full copyright and license information, please view the LICENSE file that was distributed with this source code. Copyright (c) Ben Ramsey ben@b.nosp@m.enra.nosp@m.msey..nosp@m.com http://opensource.org/licenses/MIT MIT
◆ v1()
Ramsey\Uuid\v1 |
( |
|
$node = null , |
|
|
|
$clockSeq = null |
|
) |
| |
Generate a version 1 UUID from a host ID, sequence number, and the current time.
- Paramètres
-
int | string | null | $node | A 48-bit number representing the hardware address This number may be represented as an integer or a hexadecimal string. |
int | null | $clockSeq | A 14-bit number used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes. |
- Renvoie
- string
- Exceptions
-
UnsatisfiedDependencyException | if called on a 32-bit system and Moontoast\Math\BigNumber is not present |
InvalidArgumentException | |
Exception | if it was not possible to gather sufficient entropy |
Références Uuid\uuid1().
◆ v3()
Ramsey\Uuid\v3 |
( |
|
$ns, |
|
|
|
$name |
|
) |
| |
Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which is a UUID) and a name (which is a string).
- Paramètres
-
string | UuidInterface | $ns | The UUID namespace in which to create the named UUID |
string | $name | The name to create a UUID for |
- Renvoie
- string
- Exceptions
-
InvalidUuidStringException | |
Références $name, et Uuid\uuid3().
◆ v4()
Generate a version 4 (random) UUID.
- Renvoie
- string
- Exceptions
-
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
InvalidArgumentException | |
Exception | |
Références Uuid\uuid4().
◆ v5()
Ramsey\Uuid\v5 |
( |
|
$ns, |
|
|
|
$name |
|
) |
| |
Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which is a UUID) and a name (which is a string).
- Paramètres
-
string | UuidInterface | $ns | The UUID namespace in which to create the named UUID |
string | $name | The name to create a UUID for |
- Renvoie
- string
- Exceptions
-
InvalidUuidStringException | |
Références $name, et Uuid\uuid5().