PHP Class VersionPress\Utils\IdUtil

Afficher le fichier Open project: versionpress/versionpress Class Usage Examples

Méthodes publiques

Méthode Description
getRegexMatchingId ( )
newId ( ) : string Generates and returns a new ID that is suitable as a globally unique identifier of any VersionPress entity (post, comment, user, etc.). The format is basically an upper-case, delimiter-less UUID (GUID) version 4, e.g. B3851EC74871452792B5EF5616BAE1E6.
newUuid ( $formatString = '%04x%04x-%04x-%04x-%04x-%04x%04x%04x' ) : string Inspired by http://php.net/manual/en/function.uniqid.php#94959

Private Methods

Méthode Description
__construct ( )

Method Details

getRegexMatchingId() public static méthode

public static getRegexMatchingId ( )

newId() public static méthode

See wiki docs for discussion about the chosen ID algorightm and format.
public static newId ( ) : string
Résultat string

newUuid() public static méthode

Inspired by http://php.net/manual/en/function.uniqid.php#94959
public static newUuid ( $formatString = '%04x%04x-%04x-%04x-%04x-%04x%04x%04x' ) : string
$formatString
Résultat string