mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-25 17:45:35 +03:00
[ci skip] Standardize how class names are represented in text
This commit is contained in:
@@ -25,7 +25,7 @@ Version 6: Ordered-time
|
||||
:ref:`version 1 UUID <rfc4122.version1>` with a *monotonically increasing*
|
||||
UUID. For more details, see :ref:`nonstandard.version6`.
|
||||
|
||||
GUID
|
||||
Globally Unique Identifiers (GUIDs)
|
||||
A globally unique identifier, or GUID, is often used as a synonym for UUID.
|
||||
A key difference is the order of the bytes. Any `RFC 4122`_ version UUID may
|
||||
be represented as a GUID. For more details, see :ref:`nonstandard.guid`.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _nonstandard.guid:
|
||||
|
||||
=================================
|
||||
Globally Unique Identifier (GUID)
|
||||
=================================
|
||||
===================================
|
||||
Globally Unique Identifiers (GUIDs)
|
||||
===================================
|
||||
|
||||
.. tip::
|
||||
|
||||
|
||||
+3
-1
@@ -104,6 +104,8 @@ library.
|
||||
* - :php:meth:`Uuid::fromInteger() <Ramsey\\Uuid\\Uuid::fromInteger>`
|
||||
- Creates a UUID instance from a string integer.
|
||||
* - :php:meth:`Uuid::fromDateTime() <Ramsey\\Uuid\\Uuid::fromDateTime>`
|
||||
- Creates a version 1 UUID instance from a PHP ``\DateTimeInterface``.
|
||||
- Creates a version 1 UUID instance from a PHP `DateTimeInterface`_.
|
||||
|
||||
|
||||
.. _RFC 4122: https://tools.ietf.org/html/rfc4122
|
||||
.. _DateTimeInterface: https://www.php.net/datetimeinterface
|
||||
|
||||
@@ -8,33 +8,33 @@ Exceptions
|
||||
|
||||
.. php:exception:: BuilderNotFoundException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that no suitable UUID builder could be found.
|
||||
|
||||
.. php:exception:: DateTimeException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that the PHP DateTime extension encountered an
|
||||
exception or error.
|
||||
|
||||
.. php:exception:: DceSecurityException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate an exception occurred while dealing with DCE Security
|
||||
(version 2) UUIDs
|
||||
|
||||
.. php:exception:: InvalidArgumentException
|
||||
|
||||
Extends ``\InvalidArgumentException``.
|
||||
Extends `InvalidArgumentException <https://www.php.net/invalidargumentexception>`_.
|
||||
|
||||
Thrown to indicate that the argument received is not valid.
|
||||
|
||||
.. php:exception:: InvalidBytesException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that the bytes being operated on are invalid in some way.
|
||||
|
||||
@@ -46,38 +46,38 @@ Exceptions
|
||||
|
||||
.. php:exception:: NameException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that an error occurred while attempting to hash a
|
||||
namespace and name
|
||||
|
||||
.. php:exception:: NodeException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that attempting to fetch or create a node ID encountered
|
||||
an error.
|
||||
|
||||
.. php:exception:: RandomSourceException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that the source of random data encountered an error.
|
||||
|
||||
.. php:exception:: TimeSourceException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate that the source of time encountered an error.
|
||||
|
||||
.. php:exception:: UnableToBuildUuidException
|
||||
|
||||
Extends ``\RuntimeException``.
|
||||
Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
|
||||
|
||||
Thrown to indicate a builder is unable to build a UUID.
|
||||
|
||||
.. php:exception:: UnsupportedOperationException
|
||||
|
||||
Extends ``\LogicException``.
|
||||
Extends `LogicException <https://www.php.net/logicexception>`_.
|
||||
|
||||
Thrown to indicate that the requested operation is not supported.
|
||||
|
||||
@@ -10,4 +10,4 @@ Guid\\Fields
|
||||
|
||||
Implements :php:interface:`Ramsey\\Uuid\\Rfc4122\\FieldsInterface`.
|
||||
|
||||
``Guid\Fields`` represents the fields of a GUID.
|
||||
Guid\Fields represents the fields of a GUID.
|
||||
|
||||
@@ -10,7 +10,7 @@ Rfc4122\\FieldsInterface
|
||||
|
||||
Implements :php:interface:`Ramsey\\Uuid\\Fields\\FieldsInterface`.
|
||||
|
||||
``Rfc4122\FieldsInterface`` represents the fields of an RFC 4122 UUID.
|
||||
Rfc4122\FieldsInterface represents the fields of an RFC 4122 UUID.
|
||||
In addition to the methods defined on the interface, this class additionally
|
||||
defines the following methods.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Rfc4122\\UuidInterface
|
||||
|
||||
Implements :php:interface:`Ramsey\\Uuid\\UuidInterface`.
|
||||
|
||||
``Rfc4122\UuidInterface`` represents an RFC 4122 UUID. In addition to the
|
||||
Rfc4122\UuidInterface represents an RFC 4122 UUID. In addition to the
|
||||
methods defined on the interface, this interface additionally defines the
|
||||
following methods.
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ Rfc4122\\UuidV2
|
||||
|
||||
.. php:method:: getDateTime()
|
||||
|
||||
Returns a DateTimeInterface object representing the timestamp associated
|
||||
with the UUID
|
||||
Returns a `DateTimeInterface <https://www.php.net/datetimeinterface>`_
|
||||
instance representing the timestamp associated with the UUID
|
||||
|
||||
.. caution::
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ Types
|
||||
|
||||
.. php:class:: TypeInterface
|
||||
|
||||
Implements ``\JsonSerializable`` and ``\Serializable``.
|
||||
Implements `JsonSerializable <https://www.php.net/jsonserializable>`_ and
|
||||
`Serializable <https://www.php.net/serializable>`_.
|
||||
|
||||
TypeInterface ensures consistency in typed values returned by ramsey/uuid.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Uuid
|
||||
====
|
||||
|
||||
``Ramsey\Uuid`` provides static methods for the most common functionality for
|
||||
Ramsey\Uuid\Uuid provides static methods for the most common functionality for
|
||||
generating and working with UUIDs. It also provides constants used throughout
|
||||
the ramsey/uuid library.
|
||||
|
||||
@@ -141,7 +141,7 @@ the ramsey/uuid library.
|
||||
|
||||
.. php:staticmethod:: fromString($uuid)
|
||||
|
||||
Creates an instance of ``UuidInterface`` from the string standard
|
||||
Creates an instance of UuidInterface from the string standard
|
||||
representation.
|
||||
|
||||
:param string $uuid: The string standard representation of a UUID
|
||||
@@ -149,21 +149,22 @@ the ramsey/uuid library.
|
||||
|
||||
.. php:staticmethod:: fromBytes($bytes)
|
||||
|
||||
Creates an instance of ``UuidInterface`` from a 16-byte string.
|
||||
Creates an instance of UuidInterface from a 16-byte string.
|
||||
|
||||
:param string $bytes: A 16-byte binary string representation of a UUID
|
||||
:returntype: Ramsey\\Uuid\\UuidInterface
|
||||
|
||||
.. php:staticmethod:: fromInteger($integer)
|
||||
|
||||
Creates an instance of ``UuidInterface`` from a 128-bit string integer.
|
||||
Creates an instance of UuidInterface from a 128-bit string integer.
|
||||
|
||||
:param string $integer: A 128-bit string integer representation of a UUID
|
||||
:returntype: Ramsey\\Uuid\\UuidInterface
|
||||
|
||||
.. php:staticmethod:: fromDateTime($dateTime[, $node[, $clockSeq]])
|
||||
|
||||
Creates a version 1 UUID instance from a ``\DateTimeInterface`` instance.
|
||||
Creates a version 1 UUID instance from a `DateTimeInterface
|
||||
<https://www.php.net/datetimeinterface>`_ instance.
|
||||
|
||||
:param DateTimeInterface $dateTime: The date from which to create the UUID instance
|
||||
:param Ramsey\\Uuid\\Type\\Hexadecimal|null $node: An optional hexadecimal node to use
|
||||
|
||||
@@ -249,8 +249,8 @@ that represents a local identifier. Because of this, not only do version 2 UUIDs
|
||||
have :ref:`limited uniqueness <rfc4122.version2.uniqueness-problems>`, but they
|
||||
also lack time precision.
|
||||
|
||||
When reconstructing the timestamp to return a ``\DateTimeInterface`` instance
|
||||
from :php:meth:`UuidV2::getDateTime() <Ramsey\\Uuid\\Rfc4122\\UuidV2::getDateTime>`,
|
||||
When reconstructing the timestamp to return a `DateTimeInterface`_ instance from
|
||||
:php:meth:`UuidV2::getDateTime() <Ramsey\\Uuid\\Rfc4122\\UuidV2::getDateTime>`,
|
||||
we replace the 32 lower bits of the timestamp with zeros, since the local
|
||||
identifier should not be part of the timestamp. This results in a loss of
|
||||
precision, causing the timestamp to be off by a range of 0 to 429.4967295
|
||||
@@ -270,3 +270,4 @@ it could be off by about 7 minutes.
|
||||
|
||||
.. _Distributed Computing Environment: https://en.wikipedia.org/wiki/Distributed_Computing_Environment
|
||||
.. _POSIX: https://en.wikipedia.org/wiki/POSIX
|
||||
.. _DateTimeInterface: https://www.php.net/datetimeinterface
|
||||
|
||||
Reference in New Issue
Block a user