PHP Class VersionPress\Utils\IdUtil

Exibir arquivo Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method 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

Method Description
__construct ( )

Method Details

getRegexMatchingId() public static method

public static getRegexMatchingId ( )

newId() public static method

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

newUuid() public static method

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
return string