rfc4122-uuidv2.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .. _reference.rfc4122.uuidv2:
  2. ===============
  3. Rfc4122\\UuidV2
  4. ===============
  5. .. php:namespace:: Ramsey\Uuid\Rfc4122
  6. .. php:class:: UuidV2
  7. Implements :php:interface:`Ramsey\\Uuid\\Rfc4122\\UuidInterface`.
  8. UuidV2 represents a :ref:`version 2, DCE Security UUID <rfc4122.version2>`.
  9. In addition to providing the methods defined on the interface, this class
  10. additionally provides the following methods.
  11. .. php:method:: getDateTime()
  12. Returns a `DateTimeInterface <https://www.php.net/datetimeinterface>`_
  13. instance representing the timestamp associated with the UUID
  14. .. caution::
  15. It is important to note that version 2 UUIDs suffer from some loss
  16. of timestamp precision. See :ref:`rfc4122.version2.timestamp-problems`
  17. to learn more.
  18. :returns: A date object representing the timestamp associated with the UUID
  19. :returntype: ``\DateTimeInterface``
  20. .. php:method:: getLocalDomain()
  21. :returns: The local domain identifier for this UUID, which is one of
  22. :php:const:`Ramsey\\Uuid\\Uuid::DCE_DOMAIN_PERSON`,
  23. :php:const:`Ramsey\\Uuid\\Uuid::DCE_DOMAIN_GROUP`, or
  24. :php:const:`Ramsey\\Uuid\\Uuid::DCE_DOMAIN_ORG`
  25. :returntype: ``int``
  26. .. php:method:: getLocalDomainName()
  27. :returns: A string name associated with the local domain identifier (one of "person," "group," or "org")
  28. :returntype: ``string``
  29. .. php:method:: getLocalIdentifier()
  30. :returns: The local identifier used when creating this UUID
  31. :returntype: Ramsey\\Uuid\\Type\\Integer