本文整理汇总了PHP中Generator::uniqueRid方法的典型用法代码示例。如果您正苦于以下问题:PHP Generator::uniqueRid方法的具体用法?PHP Generator::uniqueRid怎么用?PHP Generator::uniqueRid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generator
的用法示例。
在下文中一共展示了Generator::uniqueRid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateRid
public static function generateRid()
{
self::actToken();
User::$rid = Generator::uniqueRid();
DB::createUser(Generator::unformatRid(User::$rid), User::$ip, User::$sid, User::$token);
Utilities::log("Generated new Rid " . User::toString());
return self::encodeRid(Generator::formatRid(User::$rid));
}
示例2: generate
public static function generate($_id = null, $_rid = null, $_ip = "", $_token = "", $_sid = "")
{
self::$id = $_id;
self::$sid = $_sid == "" ? self::getSid() : $_sid;
self::$ip = $_ip == "" ? self::getIp() : $_ip;
self::$token = $_token == "" ? Generator::token() : $_token;
self::$rid = $_rid == null ? Generator::uniqueRid() : $_rid;
Utilities::log("Generated new user " . self::toString());
DB::createUser(self::$rid, self::$ip, self::$sid, self::$token);
}