Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (array $fields, NumberConverterInterface $converter, CodecInterface $codec) | |
__toString () | |
jsonSerialize () | |
serialize () | |
__serialize () | |
unserialize ($serialized) | |
__unserialize (array $serialized) | |
compareTo (UuidInterface $other) | |
equals ($other) | |
getBytes () | |
getClockSeqHiAndReserved () | |
getClockSeqHiAndReservedHex () | |
getClockSeqLow () | |
getClockSeqLowHex () | |
getClockSequence () | |
getClockSequenceHex () | |
getNumberConverter () | |
getDateTime () | |
getFields () | |
getFieldsHex () | |
getHex () | |
getInteger () | |
getLeastSignificantBits () | |
getLeastSignificantBitsHex () | |
getMostSignificantBits () | |
getMostSignificantBitsHex () | |
getNode () | |
getNodeHex () | |
getTimeHiAndVersion () | |
getTimeHiAndVersionHex () | |
getTimeLow () | |
getTimeLowHex () | |
getTimeMid () | |
getTimeMidHex () | |
getTimestamp () | |
getTimestampHex () | |
getUrn () | |
getVariant () | |
getVersion () | |
toString () | |
Fonctions membres publiques statiques | |
static | getFactory () |
static | setFactory (UuidFactoryInterface $factory) |
static | fromBytes ($bytes) |
static | fromString ($name) |
static | fromInteger ($integer) |
static | isValid ($uuid) |
static | uuid1 ($node=null, $clockSeq=null) |
static | uuid3 ($ns, $name) |
static | uuid4 () |
static | uuid5 ($ns, $name) |
Champs de données | |
const | NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8' |
const | NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8' |
const | NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8' |
const | NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8' |
const | NIL = '00000000-0000-0000-0000-000000000000' |
const | RESERVED_NCS = 0 |
const | RFC_4122 = 2 |
const | RESERVED_MICROSOFT = 6 |
const | RESERVED_FUTURE = 7 |
const | VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$' |
const | UUID_TYPE_TIME = 1 |
const | UUID_TYPE_IDENTIFIER = 2 |
const | UUID_TYPE_HASH_MD5 = 3 |
const | UUID_TYPE_RANDOM = 4 |
const | UUID_TYPE_HASH_SHA1 = 5 |
Attributs protégés | |
$codec | |
$fields | |
$converter | |
Attributs privés statiques | |
static | $factory = null |
Represents a universally unique identifier (UUID), according to RFC 4122.
This class provides immutable UUID objects (the Uuid class) and the static methods uuid1()
, uuid3()
, uuid4()
, and uuid5()
for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1()
or uuid4()
. Note that uuid1()
may compromise privacy since it creates a UUID containing the computer’s network address. uuid4()
creates a random UUID.
http://en.wikipedia.org/wiki/Universally_unique_identifier http://docs.python.org/3/library/uuid.html http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html
__construct | ( | array | $fields, |
NumberConverterInterface | $converter, | ||
CodecInterface | $codec | ||
) |
Creates a universally unique identifier (UUID) from an array of fields.
Unless you're making advanced use of this library to generate identifiers that deviate from RFC 4122, you probably do not want to instantiate a UUID directly. Use the static methods, instead:
array | $fields | An array of fields from which to construct a UUID; see { |
NumberConverterInterface | $converter | The number converter to use for converting hex values to/from integers. |
CodecInterface | $codec | The codec to use when encoding or decoding UUID strings. |
Références Uuid\$codec, Uuid\$converter, Uuid\$fields, et fields.
__serialize | ( | ) |
Références Uuid\toString().
__toString | ( | ) |
Converts this UUID object to a string when the object is used in any string context.
Références Uuid\toString().
__unserialize | ( | array | $serialized | ) |
array{string | string} $serialized |
InvalidUuidStringException |
Références Uuid\unserialize().
compareTo | ( | UuidInterface | $other | ) |
Compares this UUID to the specified UUID.
The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is greater for the first UUID.
UuidInterface | $other | UUID to which this UUID is compared |
$uuid
Implémente UuidInterface.
Références UuidInterface\getLeastSignificantBitsHex(), Uuid\getLeastSignificantBitsHex(), UuidInterface\getMostSignificantBitsHex(), et Uuid\getMostSignificantBitsHex().
Référencé par Uuid\equals().
equals | ( | $other | ) |
Compares this object to the specified object.
The result is true if and only if the argument is not null, is a UUID object, has the same variant, and contains the same value, bit for bit, as this UUID.
object | $other |
$other
is equal to this UUID Implémente UuidInterface.
Références Uuid\compareTo().
|
static |
Creates a UUID from a byte string.
string | $bytes |
InvalidUuidStringException | |
InvalidArgumentException |
Référencé par AttestationObjectLoader\load().
|
static |
Creates a UUID from a 128-bit integer string.
string | $integer | String representation of 128-bit integer |
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
InvalidUuidStringException |
|
static |
Creates a UUID from the string standard representation.
string | $name | A string that specifies a UUID |
InvalidUuidStringException |
Références $name.
getBytes | ( | ) |
Returns the UUID as a 16-byte string (containing the six integer fields in big-endian byte order).
Implémente UuidInterface.
Références $this.
getClockSeqHiAndReserved | ( | ) |
Returns the high field of the clock sequence multiplexed with the variant (bits 65-72 of the UUID).
Références Uuid\getClockSeqHiAndReservedHex().
Référencé par Uuid\getClockSequence(), Uuid\getFields(), et Uuid\getVariant().
getClockSeqHiAndReservedHex | ( | ) |
Returns the high field of the clock sequence multiplexed with the variant (bits 65-72 of the UUID).
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getClockSeqHiAndReserved().
getClockSeqLow | ( | ) |
Returns the low field of the clock sequence (bits 73-80 of the UUID).
Références Uuid\getClockSeqLowHex().
Référencé par Uuid\getClockSequence(), et Uuid\getFields().
getClockSeqLowHex | ( | ) |
Returns the low field of the clock sequence (bits 73-80 of the UUID).
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getClockSeqLow().
getClockSequence | ( | ) |
Returns the clock sequence value associated with this UUID.
For UUID version 1, the clock sequence is used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes.
For UUID version 3 or 5, the clock sequence is a 14-bit value constructed from a name as described in RFC 4122, Section 4.3.
For UUID version 4, clock sequence is a randomly or pseudo-randomly generated 14-bit value as described in RFC 4122, Section 4.4.
Références Uuid\getClockSeqHiAndReserved(), et Uuid\getClockSeqLow().
Référencé par Uuid\getClockSequenceHex().
getClockSequenceHex | ( | ) |
Returns the clock sequence value associated with this UUID.
Implémente UuidInterface.
Références Uuid\getClockSequence().
getDateTime | ( | ) |
Returns a PHP DateTime
object representing the timestamp associated with this UUID.The timestamp value is only meaningful in a time-based UUID, which has version type 1. If this UUID is not a time-based UUID then this method throws UnsupportedOperationException
.
UnsupportedOperationException | If this UUID is not a version 1 UUID |
UnsatisfiedDependencyException | if called in a 32-bit system and Moontoast\Math\BigNumber is not present |
Implémente UuidInterface.
Références Uuid\getTimestamp(), et Uuid\getVersion().
|
static |
Returns the currently set factory used to create UUIDs.
getFields | ( | ) |
Returns an array of the fields of this UUID, with keys named according to the RFC 4122 names for the fields.
Références Uuid\getClockSeqHiAndReserved(), Uuid\getClockSeqLow(), Uuid\getNode(), Uuid\getTimeHiAndVersion(), Uuid\getTimeLow(), et Uuid\getTimeMid().
getFieldsHex | ( | ) |
Returns an array of the fields of this UUID, with keys named according to the RFC 4122 names for the fields.
Implémente UuidInterface.
Références Uuid\$fields.
getHex | ( | ) |
Returns the hexadecimal value of the UUID.
Implémente UuidInterface.
Références Uuid\toString().
Référencé par Uuid\getInteger().
getInteger | ( | ) |
Returns the integer value of the UUID, converted to an appropriate number representation.
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
Implémente UuidInterface.
Références Uuid\getHex().
getLeastSignificantBits | ( | ) |
Returns the least significant 64 bits of this UUID's 128 bit value.
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
Références Uuid\getLeastSignificantBitsHex().
getLeastSignificantBitsHex | ( | ) |
Returns the least significant 64 bits of this UUID's 128 bit value.
Implémente UuidInterface.
Références fields.
Référencé par Uuid\compareTo(), et Uuid\getLeastSignificantBits().
getMostSignificantBits | ( | ) |
Returns the most significant 64 bits of this UUID's 128 bit value.
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
Références Uuid\getMostSignificantBitsHex().
getMostSignificantBitsHex | ( | ) |
Returns the most significant 64 bits of this UUID's 128 bit value.
Implémente UuidInterface.
Références fields.
Référencé par Uuid\compareTo(), et Uuid\getMostSignificantBits().
getNode | ( | ) |
Returns the node value associated with this UUID
For UUID version 1, the node field consists of an IEEE 802 MAC address, usually the host address. For systems with multiple IEEE 802 addresses, any available one can be used. The lowest addressed octet (octet number 10) contains the global/local bit and the unicast/multicast bit, and is the first octet of the address transmitted on an 802.3 LAN.
For systems with no IEEE address, a randomly or pseudo-randomly generated value may be used; see RFC 4122, Section 4.5. The multicast bit must be set in such addresses, in order that they will never conflict with addresses obtained from network cards.
For UUID version 3 or 5, the node field is a 48-bit value constructed from a name as described in RFC 4122, Section 4.3.
For UUID version 4, the node field is a randomly or pseudo-randomly generated 48-bit value as described in RFC 4122, Section 4.4.
Références Uuid\getNodeHex().
Référencé par Uuid\getFields().
getNodeHex | ( | ) |
Returns the node value associated with this UUID
For UUID version 1, the node field consists of an IEEE 802 MAC address, usually the host address. For systems with multiple IEEE 802 addresses, any available one can be used. The lowest addressed octet (octet number 10) contains the global/local bit and the unicast/multicast bit, and is the first octet of the address transmitted on an 802.3 LAN.
For systems with no IEEE address, a randomly or pseudo-randomly generated value may be used; see RFC 4122, Section 4.5. The multicast bit must be set in such addresses, in order that they will never conflict with addresses obtained from network cards.
For UUID version 3 or 5, the node field is a 48-bit value constructed from a name as described in RFC 4122, Section 4.3.
For UUID version 4, the node field is a randomly or pseudo-randomly generated 48-bit value as described in RFC 4122, Section 4.4.
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getNode().
getNumberConverter | ( | ) |
Returns the number converter to use for converting hex values to/from integers.
Implémente UuidInterface.
Références Uuid\$converter.
getTimeHiAndVersion | ( | ) |
Returns the high field of the timestamp multiplexed with the version number (bits 49-64 of the UUID).
Références Uuid\getTimeHiAndVersionHex().
Référencé par Uuid\getFields(), Uuid\getTimestampHex(), et Uuid\getVersion().
getTimeHiAndVersionHex | ( | ) |
Returns the high field of the timestamp multiplexed with the version number (bits 49-64 of the UUID).
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getTimeHiAndVersion().
getTimeLow | ( | ) |
Returns the low field of the timestamp (the first 32 bits of the UUID).
Références Uuid\getTimeLowHex().
Référencé par Uuid\getFields().
getTimeLowHex | ( | ) |
Returns the low field of the timestamp (the first 32 bits of the UUID).
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getTimeLow().
getTimeMid | ( | ) |
Returns the middle field of the timestamp (bits 33-48 of the UUID).
Références Uuid\getTimeMidHex().
Référencé par Uuid\getFields().
getTimeMidHex | ( | ) |
Returns the middle field of the timestamp (bits 33-48 of the UUID).
Implémente UuidInterface.
Références fields.
Référencé par Uuid\getTimeMid().
getTimestamp | ( | ) |
Returns the timestamp value associated with this UUID.
The 60 bit timestamp value is constructed from the time_low, time_mid, and time_hi fields of this UUID. The resulting timestamp is measured in 100-nanosecond units since midnight, October 15, 1582 UTC.
The timestamp value is only meaningful in a time-based UUID, which has version type 1. If this UUID is not a time-based UUID then this method throws UnsupportedOperationException.
UnsupportedOperationException | If this UUID is not a version 1 UUID http://tools.ietf.org/html/rfc4122#section-4.1.4 |
Références Uuid\getTimestampHex(), et Uuid\getVersion().
Référencé par Uuid\getDateTime().
getTimestampHex | ( | ) |
Returns the timestamp value associated with this UUID.The 60 bit timestamp value is constructed from the time_low, time_mid, and time_hi fields of this UUID. The resulting timestamp is measured in 100-nanosecond units since midnight, October 15, 1582 UTC.The timestamp value is only meaningful in a time-based UUID, which has version type 1. If this UUID is not a time-based UUID then this method throws UnsupportedOperationException.
UnsupportedOperationException | If this UUID is not a version 1 UUID http://tools.ietf.org/html/rfc4122#section-4.1.4 |
Implémente UuidInterface.
Références fields, Uuid\getTimeHiAndVersion(), et Uuid\getVersion().
Référencé par DegradedUuid\getDateTime(), et Uuid\getTimestamp().
getUrn | ( | ) |
Returns the string representation of the UUID as a URN.
Implémente UuidInterface.
Références Uuid\toString().
getVariant | ( | ) |
Returns the variant number associated with this UUID.
The variant number describes the layout of the UUID. The variant number has the following meaning:
Implémente UuidInterface.
Références Uuid\getClockSeqHiAndReserved().
Référencé par Uuid\getVersion().
getVersion | ( | ) |
Returns the version number associated with this UUID.
The version number describes how this UUID was generated and has the following meaning:
Returns null if this UUID is not an RFC 4122 variant, since version is only meaningful for this variant.
Implémente UuidInterface.
Références Uuid\getTimeHiAndVersion(), Uuid\getVariant(), et null.
Référencé par DegradedUuid\getDateTime(), Uuid\getDateTime(), DegradedUuid\getTimestamp(), Uuid\getTimestamp(), et Uuid\getTimestampHex().
|
static |
Check if a string is a valid UUID.
string | $uuid | The string UUID to test |
Référencé par StringCodec\extractComponents().
jsonSerialize | ( | ) |
Converts this UUID object to a string when the object is serialized with json_encode()
Références Uuid\toString().
serialize | ( | ) |
Converts this UUID object to a string when the object is serialized with serialize()
Références Uuid\toString().
|
static |
Sets the factory used to create UUIDs.
UuidFactoryInterface | $factory |
Références Uuid\$factory.
toString | ( | ) |
Converts this UUID into a string representation.
Implémente UuidInterface.
Références $this.
Référencé par Uuid\__serialize(), Uuid\__toString(), Uuid\getHex(), Uuid\getUrn(), Uuid\jsonSerialize(), et Uuid\serialize().
unserialize | ( | $serialized | ) |
Re-constructs the object from its serialized form.
string | $serialized | InvalidUuidStringException |
Références fields.
Référencé par Uuid\__unserialize().
Generate a version 1 UUID from a host ID, sequence number, and the current time.
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 |
Référencé par Ramsey\Uuid\v1().
|
static |
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).
string | UuidInterface | $ns | The UUID namespace in which to create the named UUID |
string | $name | The name to create a UUID for |
InvalidUuidStringException |
Références $name.
Référencé par Ramsey\Uuid\v3().
|
static |
Generate a version 4 (random) UUID.
UnsatisfiedDependencyException | if Moontoast\Math\BigNumber is not present |
InvalidArgumentException | |
Exception |
Référencé par Ramsey\Uuid\v4().
|
static |
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).
string | UuidInterface | $ns | The UUID namespace in which to create the named UUID |
string | $name | The name to create a UUID for |
InvalidUuidStringException |
Références $name.
Référencé par Ramsey\Uuid\v5().
|
protected |
Référencé par Uuid\__construct().
|
protected |
Référencé par Uuid\__construct(), et Uuid\getNumberConverter().
|
staticprivate |
Référencé par Uuid\setFactory().
|
protected |
Référencé par Uuid\__construct(), et Uuid\getFieldsHex().
const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8' |
When this namespace is specified, the name string is a fully-qualified domain name. http://tools.ietf.org/html/rfc4122#appendix-C
const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8' |
When this namespace is specified, the name string is an ISO OID. http://tools.ietf.org/html/rfc4122#appendix-C
const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8' |
When this namespace is specified, the name string is a URL. http://tools.ietf.org/html/rfc4122#appendix-C
const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8' |
When this namespace is specified, the name string is an X.500 DN in DER or a text output format. http://tools.ietf.org/html/rfc4122#appendix-C
const NIL = '00000000-0000-0000-0000-000000000000' |
The nil UUID is special form of UUID that is specified to have all 128 bits set to zero. http://tools.ietf.org/html/rfc4122#section-4.1.7
const RESERVED_FUTURE = 7 |
Reserved for future definition. http://tools.ietf.org/html/rfc4122#section-4.1.1
const RESERVED_MICROSOFT = 6 |
Reserved for Microsoft compatibility. http://tools.ietf.org/html/rfc4122#section-4.1.1
const RESERVED_NCS = 0 |
Reserved for NCS compatibility. http://tools.ietf.org/html/rfc4122#section-4.1.1
const RFC_4122 = 2 |
Specifies the UUID layout given in RFC 4122. http://tools.ietf.org/html/rfc4122#section-4.1.1
const UUID_TYPE_HASH_MD5 = 3 |
Version 3 (name-based and hashed with MD5) UUID object constant identifier
const UUID_TYPE_HASH_SHA1 = 5 |
Version 5 (name-based and hashed with SHA1) UUID object constant identifier
const UUID_TYPE_IDENTIFIER = 2 |
Version 2 (identifier-based) UUID object constant identifier
const UUID_TYPE_RANDOM = 4 |
Version 4 (random) UUID object constant identifier
const UUID_TYPE_TIME = 1 |
Version 1 (time-based) UUID object constant identifier
const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$' |
Regular expression pattern for matching a valid UUID of any variant.