Skip to main content

Module id

Module id 

Source
Expand description

Document identifiers: unique generates one, custom takes one given.

PHP: Utopia\Database\Id.

Constants§

PADDING
The random hex characters unique appends to the time-based part.

Functions§

custom
An ID given by the caller, as it is.
unique
A new unique ID: 13 hex characters of the current time (uniqid()), then PADDING random hex characters (20 characters in all).
unique_padded
A new unique ID with padding random hex characters after the 13 of uniqid() (none when padding is 0 or less).