Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe UuidFactory
+ Graphe d'héritage de UuidFactory:

Fonctions membres publiques

 __construct (FeatureSet $features=null)
 
 getCodec ()
 
 setCodec (CodecInterface $codec)
 
 getNodeProvider ()
 
 getRandomGenerator ()
 
 getTimeGenerator ()
 
 setTimeGenerator (TimeGeneratorInterface $generator)
 
 getNumberConverter ()
 
 setRandomGenerator (RandomGeneratorInterface $generator)
 
 setNumberConverter (NumberConverterInterface $converter)
 
 getUuidBuilder ()
 
 setUuidBuilder (UuidBuilderInterface $builder)
 
 fromBytes ($bytes)
 
 fromString ($uuid)
 
 fromInteger ($integer)
 
 uuid1 ($node=null, $clockSeq=null)
 
 uuid3 ($ns, $name)
 
 uuid4 ()
 
 uuid5 ($ns, $name)
 
 uuid (array $fields)
 

Fonctions membres protégées

 uuidFromNsAndName ($ns, $name, $version, $hashFunction)
 
 uuidFromHashedName ($hash, $version)
 

Attributs privés

 $codec = null
 
 $nodeProvider = null
 
 $numberConverter = null
 
 $randomGenerator = null
 
 $timeGenerator = null
 
 $uuidBuilder = null
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( FeatureSet  $features = null)

Constructs a UuidFactory for creating Ramsey\Uuid\UuidInterface instances

Paramètres
FeatureSet$featuresA set of features for use when creating UUIDs

Documentation des fonctions membres

◆ fromBytes()

fromBytes (   $bytes)

Creates a UUID from a byte string.

Paramètres
string$bytesA 16-byte string representation of a UUID
Renvoie
UuidInterface
Exceptions
InvalidUuidStringException
InvalidArgumentExceptionif string has not 16 characters

Implémente UuidFactoryInterface.

◆ fromInteger()

fromInteger (   $integer)

Creates a Uuid from an integer representationThe integer representation may be a real integer, a string integer, or an integer representation supported by a configured number converter.

Paramètres
mixed$integerThe integer to use when creating a Uuid from an integer; may be of any type understood by the configured number converter
Renvoie
UuidInterface
Exceptions
UnsatisfiedDependencyExceptionif Moontoast\Math\BigNumber is not present
InvalidUuidStringException

Implémente UuidFactoryInterface.

Références UuidFactory\fromString().

◆ fromString()

fromString (   $uuid)

Creates a UUID from the string standard representation

Paramètres
string$uuidA string representation of a UUID
Renvoie
UuidInterface
Exceptions
InvalidUuidStringException

Implémente UuidFactoryInterface.

Référencé par UuidFactory\fromInteger().

◆ getCodec()

getCodec ( )

Returns the UUID coder-decoder used by this factory

Renvoie
CodecInterface

Références UuidFactory\$codec.

◆ getNodeProvider()

getNodeProvider ( )

Returns the system node ID provider used by this factory

Renvoie
NodeProviderInterface

Références UuidFactory\$nodeProvider.

◆ getNumberConverter()

getNumberConverter ( )

Returns the number converter used by this factory

Renvoie
NumberConverterInterface

Références UuidFactory\$numberConverter.

◆ getRandomGenerator()

getRandomGenerator ( )

Returns the random UUID generator used by this factory

Renvoie
RandomGeneratorInterface

Références UuidFactory\$randomGenerator.

◆ getTimeGenerator()

getTimeGenerator ( )

Returns the time-based UUID generator used by this factory

Renvoie
TimeGeneratorInterface

Références UuidFactory\$timeGenerator.

◆ getUuidBuilder()

getUuidBuilder ( )

Returns the UUID builder this factory uses when creating Uuid instances

Renvoie
UuidBuilderInterface $builder

Références UuidFactory\$uuidBuilder.

◆ setCodec()

setCodec ( CodecInterface  $codec)

Sets the UUID coder-decoder used by this factory

Paramètres
CodecInterface$codec

Références UuidFactory\$codec.

◆ setNumberConverter()

setNumberConverter ( NumberConverterInterface  $converter)

Sets the number converter this factory will use

Paramètres
NumberConverterInterface$converter

◆ setRandomGenerator()

setRandomGenerator ( RandomGeneratorInterface  $generator)

Sets the random UUID generator this factory will use to generate version 4 UUIDs

Paramètres
RandomGeneratorInterface$generator

◆ setTimeGenerator()

setTimeGenerator ( TimeGeneratorInterface  $generator)

Sets the time-based UUID generator this factory will use to generate version 1 UUIDs

Paramètres
TimeGeneratorInterface$generator

◆ setUuidBuilder()

setUuidBuilder ( UuidBuilderInterface  $builder)

Sets the UUID builder this factory will use when creating Uuid instances

Paramètres
UuidBuilderInterface$builder

◆ uuid()

uuid ( array  $fields)

Returns a Uuid

Uses the configured builder and codec and the provided array of hexadecimal value UUID fields to construct a Uuid object.

Paramètres
array$fieldsAn array of fields from which to construct a UUID; see {
Voir également
::getFieldsHex()} for array structure.
Renvoie
UuidInterface

Références $fields.

Référencé par UuidFactory\uuidFromHashedName().

◆ uuid1()

uuid1 (   $node = null,
  $clockSeq = null 
)

Generate a version 1 UUID from a host ID, sequence number, and the current time.

Paramètres
int | string | null$nodeA 48-bit number representing the hardware address This number may be represented as an integer or a hexadecimal string.
int | null$clockSeqA 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
UuidInterface
Exceptions
UnsatisfiedDependencyExceptionif called on a 32-bit system and Moontoast\Math\BigNumber is not present
InvalidArgumentException
Exceptionif it was not possible to gather sufficient entropy

Implémente UuidFactoryInterface.

Références UuidFactory\uuidFromHashedName().

◆ uuid3()

uuid3 (   $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$nsThe UUID namespace in which to create the named UUID
string$nameThe name to create a UUID for
Renvoie
UuidInterface
Exceptions
InvalidUuidStringException

Implémente UuidFactoryInterface.

Références $name, et UuidFactory\uuidFromNsAndName().

◆ uuid4()

uuid4 ( )

Generate a version 4 (random) UUID.

Renvoie
UuidInterface
Exceptions
UnsatisfiedDependencyExceptionif Moontoast\Math\BigNumber is not present
InvalidArgumentException
Exception

Implémente UuidFactoryInterface.

Références UuidFactory\uuidFromHashedName().

◆ uuid5()

uuid5 (   $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$nsThe UUID namespace in which to create the named UUID
string$nameThe name to create a UUID for
Renvoie
UuidInterface
Exceptions
InvalidUuidStringException

Implémente UuidFactoryInterface.

Références $name, et UuidFactory\uuidFromNsAndName().

◆ uuidFromHashedName()

uuidFromHashedName (   $hash,
  $version 
)
protected

Returns a Uuid created from $hash with the version field set to $version and the variant field set for RFC 4122

Paramètres
string$hashThe hash to use when creating the UUID
int$versionThe UUID version to set for this hash (1, 3, 4, or 5)
Renvoie
UuidInterface

Références $fields, $hash, $version, BinaryUtils\applyVariant(), BinaryUtils\applyVersion(), et UuidFactory\uuid().

Référencé par UuidFactory\uuid1(), UuidFactory\uuid4(), et UuidFactory\uuidFromNsAndName().

◆ uuidFromNsAndName()

uuidFromNsAndName (   $ns,
  $name,
  $version,
  $hashFunction 
)
protected

Returns a version 3 or 5 namespaced Uuid

Paramètres
string | UuidInterface$nsThe UUID namespace to use
string$nameThe string to hash together with the namespace
int$versionThe version of UUID to create (3 or 5)
string$hashFunctionThe hash function to use when hashing together the namespace and name
Renvoie
UuidInterface
Exceptions
InvalidUuidStringException

Références $hash, $name, $version, et UuidFactory\uuidFromHashedName().

Référencé par UuidFactory\uuid3(), et UuidFactory\uuid5().

Documentation des champs

◆ $codec

$codec = null
private

◆ $nodeProvider

$nodeProvider = null
private

Référencé par UuidFactory\getNodeProvider().

◆ $numberConverter

$numberConverter = null
private

◆ $randomGenerator

$randomGenerator = null
private

◆ $timeGenerator

$timeGenerator = null
private

Référencé par UuidFactory\getTimeGenerator().

◆ $uuidBuilder

$uuidBuilder = null
private

Référencé par UuidFactory\getUuidBuilder().


La documentation de cette classe a été générée à partir du fichier suivant :