rfc4122-fieldsinterface.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .. _reference.rfc4122.fieldsinterface:
  2. ========================
  3. Rfc4122\\FieldsInterface
  4. ========================
  5. .. php:namespace:: Ramsey\Uuid\Rfc4122
  6. .. php:interface:: FieldsInterface
  7. Implements :php:interface:`Ramsey\\Uuid\\Fields\\FieldsInterface`.
  8. Rfc4122\FieldsInterface represents the fields of an RFC 4122 UUID.
  9. In addition to the methods defined on the interface, this class additionally
  10. defines the following methods.
  11. .. php:method:: getClockSeq()
  12. :returns: The full 16-bit clock sequence, with the variant bits (two most significant bits) masked out.
  13. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  14. .. php:method:: getClockSeqHiAndReserved()
  15. :returns: The high field of the clock sequence multiplexed with the variant.
  16. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  17. .. php:method:: getClockSeqLow()
  18. :returns: The low field of the clock sequence.
  19. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  20. .. php:method:: getNode()
  21. :returns: The node field.
  22. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  23. .. php:method:: getTimeHiAndVersion()
  24. :returns: The high field of the timestamp multiplexed with the version.
  25. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  26. .. php:method:: getTimeLow()
  27. :returns: The low field of the timestamp.
  28. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  29. .. php:method:: getTimeMid()
  30. :returns: The middle field of the timestamp.
  31. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  32. .. php:method:: getTimestamp()
  33. :returns: The full 60-bit timestamp, without the version.
  34. :returntype: Ramsey\\Uuid\\Type\\Hexadecimal
  35. .. php:method:: getVariant()
  36. Returns the variant, which, for RFC 4122 variant UUIDs, should always be
  37. the value ``2``.
  38. :returns: The UUID variant.
  39. :returntype: ``int``
  40. .. php:method:: getVersion()
  41. :returns: The UUID version.
  42. :returntype: ``int``
  43. .. php:method:: isNil()
  44. A *nil* UUID is a special type of UUID with all 128 bits set to zero.
  45. Its string standard representation is always
  46. ``00000000-0000-0000-0000-000000000000``.
  47. :returns: True if this UUID represents a nil UUID.
  48. :returntype: ``bool``