[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/ramsey/uuid/src/Generator/ -> DefaultTimeGenerator.php (summary)

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 <[email protected]>
License: http://opensource.org/licenses/MIT MIT
File Size: 141 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

DefaultTimeGenerator:: (3 methods):
  __construct()
  generate()
  getValidNode()


Class: DefaultTimeGenerator  - X-Ref

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)   X-Ref
Constructs a `DefaultTimeGenerator` using a node provider, time converter,
and time provider

param: NodeProviderInterface $nodeProvider
param: TimeConverterInterface $timeConverter
param: TimeProviderInterface $timeProvider

generate($node = null, $clockSeq = null)   X-Ref
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.

param: int|string $node A 48-bit number representing the hardware address
param: int $clockSeq A 14-bit number used to help avoid duplicates that
return: string A binary string

getValidNode($node)   X-Ref
Uses the node provider given when constructing this instance to get
the node ID (usually a MAC address)

param: string|int $node A node value that may be used to override the node provider
return: string Hexadecimal representation of the node ID



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer