uuidinterface.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. _reference.uuidinterface:
  2. =============
  3. UuidInterface
  4. =============
  5. .. php:namespace:: Ramsey\Uuid
  6. .. php:interface:: UuidInterface
  7. Represents a UUID.
  8. .. php:method:: compareTo($other)
  9. :param Ramsey\\Uuid\\UuidInterface $other: The UUID to compare
  10. :returns: Returns ``-1``, ``0``, or ``1`` if the UUID is less than, equal to, or greater than the other UUID.
  11. :returntype: ``int``
  12. .. php:method:: equals($other)
  13. :param object|null $other: An object to test for equality with this UUID.
  14. :returns: Returns true if the UUID is equal to the provided object.
  15. :returntype: ``bool``
  16. .. php:method:: getBytes()
  17. :returns: A binary string representation of the UUID.
  18. :returntype: ``string``
  19. .. php:method:: getFields()
  20. :returns: The fields that comprise this UUID.
  21. :returntype: Ramsey\\Uuid\\Fields\\FieldsInterface
  22. .. php:method:: getHex()
  23. :returns: The hexadecimal representation of the UUID.
  24. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  25. .. php:method:: getInteger()
  26. :returns: The integer representation of the UUID.
  27. :returntype: Ramsey\\Uuid\\Type\\Integer
  28. .. php:method:: getUrn()
  29. :returns: The string standard representation of the UUID as a `URN`_.
  30. :returntype: ``string``
  31. .. php:method:: toString()
  32. :returns: The string standard representation of the UUID.
  33. :returntype: ``string``
  34. .. php:method:: __toString()
  35. :returns: The string standard representation of the UUID.
  36. :returntype: ``string``
  37. .. _URN: https://tools.ietf.org/html/rfc8141