VersionPress\Utils\IdUtil::newId PHP Method

newId() public static method

See wiki docs for discussion about the chosen ID algorightm and format.
public static newId ( ) : string
return string
    public static function newId()
    {
        return self::newUuid('%04x%04x%04x%04x%04x%04x%04x%04x');
    }

Usage Example

Ejemplo n.º 1
0
 public function identifyEntity($entityName, $data, $id)
 {
     if ($this->schemaInfo->getEntityInfo($entityName)->usesGeneratedVpids) {
         $data['vp_id'] = IdUtil::newId();
         $this->saveId($entityName, $id, $data['vp_id']);
     }
     $data[$this->schemaInfo->getEntityInfo($entityName)->idColumnName] = $id;
     $data = $this->fillId($entityName, $data, $id);
     return $data;
 }
All Usage Examples Of VersionPress\Utils\IdUtil::newId