Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (NodeProviderInterface $nodeProvider, TimeConverterInterface $timeConverter, TimeProviderInterface $timeProvider) | |
generate ($node=null, $clockSeq=null) | |
Fonctions membres protégées | |
getValidNode ($node) | |
Attributs privés | |
$nodeProvider | |
$timeConverter | |
$timeProvider | |
DefaultTimeGenerator provides functionality to generate strings of binary data for version 1 UUIDs based on a host ID, sequence number, and the current time
__construct | ( | NodeProviderInterface | $nodeProvider, |
TimeConverterInterface | $timeConverter, | ||
TimeProviderInterface | $timeProvider | ||
) |
Constructs a DefaultTimeGenerator
using a node provider, time converter, and time provider
NodeProviderInterface | $nodeProvider | |
TimeConverterInterface | $timeConverter | |
TimeProviderInterface | $timeProvider |
Références DefaultTimeGenerator\$nodeProvider, DefaultTimeGenerator\$timeConverter, et DefaultTimeGenerator\$timeProvider.
Generate a version 1 UUID from a host ID, sequence number, and the current time
If $node is not given, we will attempt to obtain the local hardware address. If $clockSeq is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen.
int | string | $node | A 48-bit number representing the hardware address This number may be represented as an integer or a hexadecimal string. |
int | $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. |
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 |
Implémente TimeGeneratorInterface.
Références BinaryUtils\applyVariant(), BinaryUtils\applyVersion(), DefaultTimeGenerator\getValidNode(), et null.
|
protected |
Uses the node provider given when constructing this instance to get the node ID (usually a MAC address)
string | int | $node | A node value that may be used to override the node provider |
InvalidArgumentException | |
Exception |
Références null.
Référencé par DefaultTimeGenerator\generate().
|
private |
Référencé par DefaultTimeGenerator\__construct().
|
private |
Référencé par DefaultTimeGenerator\__construct().
|
private |
Référencé par DefaultTimeGenerator\__construct().