PHP 클래스 Ramsey\Uuid\UuidFactory

상속: implements Ramsey\Uuid\UuidFactoryInterface
파일 보기 프로젝트 열기: ramsey/uuid 1 사용 예제들

공개 메소드들

메소드 설명
__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