PHP Класс Ramsey\Uuid\UuidFactory

Наследование: implements Ramsey\Uuid\UuidFactoryInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Ramsey\Uuid\FeatureSet $features = null ) Constructs a UuidFactory for creating Ramsey\Uuid\UuidInterface instances
fromBytes ( $bytes )
fromInteger ( $integer )
fromString ( $uuid )
getCodec ( ) : Ramsey\Uuid\Codec\CodecInterface Returns the UUID coder-decoder used by this factory
getNodeProvider ( ) : Ramsey\Uuid\Provider\NodeProviderInterface Returns the system node ID provider used by this factory
getNumberConverter ( ) : Ramsey\Uuid\Converter\NumberConverterInterface Returns the number converter used by this factory
getRandomGenerator ( ) : Ramsey\Uuid\Generator\RandomGeneratorInterface Returns the random UUID generator used by this factory
getTimeGenerator ( ) : Ramsey\Uuid\Generator\TimeGeneratorInterface Returns the time-based UUID generator used by this factory
getUuidBuilder ( ) : Ramsey\Uuid\Builder\UuidBuilderInterface Returns the UUID builder this factory uses when creating Uuid instances
setCodec ( Ramsey\Uuid\Codec\CodecInterface $codec ) Sets the UUID coder-decoder used by this factory
setNumberConverter ( Ramsey\Uuid\Converter\NumberConverterInterface $converter ) Sets the number converter this factory will use
setRandomGenerator ( Ramsey\Uuid\Generator\RandomGeneratorInterface $generator ) Sets the random UUID generator this factory will use to generate version 4 UUIDs
setTimeGenerator ( Ramsey\Uuid\Generator\TimeGeneratorInterface $generator ) Sets the time-based UUID generator this factory will use to generate version 1 UUIDs
setUuidBuilder ( Ramsey\Uuid\Builder\UuidBuilderInterface $builder ) Sets the UUID builder this factory will use when creating Uuid instances
uuid ( array $fields ) : UuidInterface Returns a Uuid
uuid1 ( $node = null, $clockSeq = null )
uuid3 ( $ns, $name )
uuid4 ( )
uuid5 ( $ns, $name )

Защищенные методы

Метод Описание
uuidFromHashedName ( string $hash, integer $version ) : UuidInterface Returns a Uuid created from $hash with the version field set to $version and the variant field set for RFC 4122
uuidFromNsAndName ( string | UuidInterface $ns, string $name, integer $version, string $hashFunction ) : UuidInterface Returns a version 3 or 5 namespaced Uuid

Описание методов

__construct() публичный Метод

Constructs a UuidFactory for creating Ramsey\Uuid\UuidInterface instances
public __construct ( Ramsey\Uuid\FeatureSet $features = null )
$features Ramsey\Uuid\FeatureSet A set of features for use when creating UUIDs

fromBytes() публичный Метод

public fromBytes ( $bytes )

fromInteger() публичный Метод

public fromInteger ( $integer )

fromString() публичный Метод

public fromString ( $uuid )

getCodec() публичный Метод

Returns the UUID coder-decoder used by this factory
public getCodec ( ) : Ramsey\Uuid\Codec\CodecInterface
Результат Ramsey\Uuid\Codec\CodecInterface

getNodeProvider() публичный Метод

Returns the system node ID provider used by this factory
public getNodeProvider ( ) : Ramsey\Uuid\Provider\NodeProviderInterface
Результат Ramsey\Uuid\Provider\NodeProviderInterface

getNumberConverter() публичный Метод

Returns the number converter used by this factory
public getNumberConverter ( ) : Ramsey\Uuid\Converter\NumberConverterInterface
Результат Ramsey\Uuid\Converter\NumberConverterInterface

getRandomGenerator() публичный Метод

Returns the random UUID generator used by this factory
public getRandomGenerator ( ) : Ramsey\Uuid\Generator\RandomGeneratorInterface
Результат Ramsey\Uuid\Generator\RandomGeneratorInterface

getTimeGenerator() публичный Метод

Returns the time-based UUID generator used by this factory
public getTimeGenerator ( ) : Ramsey\Uuid\Generator\TimeGeneratorInterface
Результат Ramsey\Uuid\Generator\TimeGeneratorInterface

getUuidBuilder() публичный Метод

Returns the UUID builder this factory uses when creating Uuid instances
public getUuidBuilder ( ) : Ramsey\Uuid\Builder\UuidBuilderInterface
Результат Ramsey\Uuid\Builder\UuidBuilderInterface $builder

setCodec() публичный Метод

Sets the UUID coder-decoder used by this factory
public setCodec ( Ramsey\Uuid\Codec\CodecInterface $codec )
$codec Ramsey\Uuid\Codec\CodecInterface

setNumberConverter() публичный Метод

Sets the number converter this factory will use
public setNumberConverter ( Ramsey\Uuid\Converter\NumberConverterInterface $converter )
$converter Ramsey\Uuid\Converter\NumberConverterInterface

setRandomGenerator() публичный Метод

Sets the random UUID generator this factory will use to generate version 4 UUIDs
public setRandomGenerator ( Ramsey\Uuid\Generator\RandomGeneratorInterface $generator )
$generator Ramsey\Uuid\Generator\RandomGeneratorInterface

setTimeGenerator() публичный Метод

Sets the time-based UUID generator this factory will use to generate version 1 UUIDs
public setTimeGenerator ( Ramsey\Uuid\Generator\TimeGeneratorInterface $generator )
$generator Ramsey\Uuid\Generator\TimeGeneratorInterface

setUuidBuilder() публичный Метод

Sets the UUID builder this factory will use when creating Uuid instances
public setUuidBuilder ( Ramsey\Uuid\Builder\UuidBuilderInterface $builder )
$builder Ramsey\Uuid\Builder\UuidBuilderInterface

uuid() публичный Метод

Uses the configured builder and codec and the provided array of hexadecimal value UUID fields to construct a Uuid object.
public uuid ( array $fields ) : UuidInterface
$fields array An array of fields from which to construct a UUID; see {@see \Ramsey\Uuid\UuidInterface::getFieldsHex()} for array structure.
Результат UuidInterface

uuid1() публичный Метод

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

uuid3() публичный Метод

public uuid3 ( $ns, $name )

uuid4() публичный Метод

public uuid4 ( )

uuid5() публичный Метод

public uuid5 ( $ns, $name )

uuidFromHashedName() защищенный Метод

Returns a Uuid created from $hash with the version field set to $version and the variant field set for RFC 4122
protected uuidFromHashedName ( string $hash, integer $version ) : UuidInterface
$hash string The hash to use when creating the UUID
$version integer The UUID version to set for this hash (1, 3, 4, or 5)
Результат UuidInterface

uuidFromNsAndName() защищенный Метод

Returns a version 3 or 5 namespaced Uuid
protected uuidFromNsAndName ( string | UuidInterface $ns, string $name, integer $version, string $hashFunction ) : UuidInterface
$ns string | UuidInterface The UUID namespace to use
$name string The string to hash together with the namespace
$version integer The version of UUID to create (3 or 5)
$hashFunction string The hash function to use when hashing together the namespace and name
Результат UuidInterface