コード例 #1
0
ファイル: UOID.php プロジェクト: sgoendoer/sonic
 /**
  * Creates a new UOID for the current Sonic context
  * 
  * @param $gid String The global id part of the UOID
  * @param $id String The local id part of the UOID
  * 
  * @return A UOID
  */
 public static function createUOID($gid = NULL, $id = NULL)
 {
     if ($gid == NULL) {
         $gid = Sonic::getContextGlobalID();
     }
     if ($id == NULL) {
         $id = Random::getUniqueRandom();
     }
     $uoid = $gid . UOID::SEPARATOR . $id;
     return $uoid;
 }