Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit cc578c2

Browse files
committed
update
1 parent 056cf90 commit cc578c2

File tree

3 files changed

+471
-5
lines changed

3 files changed

+471
-5
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ git clone https://github.com/inhere/php-librarys.git
6666

6767
php的队列使用包装(`DbQueue` `LevelDbQueue` `PhpQueue` `RedisQueue` `ShmQueue` `SSDBQueue` `SysVQueue`)
6868

69-
### `inhere/process` [github](https://github.com/inhere/php-process) [git@osc](https://git.oschina.net/inhere/php-process)
70-
71-
进程控制、管理库(`ipc` 进程间通信 `processLogger` 进程类日志工具 `processUtil` 进程控制管理 `sharedMemory` 共享内存使用)
72-
7369
### `inhere/http` [github](https://github.com/inhere/php-http) [git@osc](https://git.oschina.net/inhere/php-http)
7470

7571
http 工具库(`request` 请求 `response` 响应 `curl` curl请求库,有简洁、完整和并发请求三个版本的类)

src/helpers/StringHelper.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public static function genSalt($length = 32)
220220
* @param int $length
221221
* @return bool|string
222222
*/
223-
public static function genUuid($length = 7)
223+
public static function genUid($length = 7)
224224
{
225225
if (!is_int($length) || $length > 32 || $length < 1) {
226226
$length = 7;
@@ -229,6 +229,18 @@ public static function genUuid($length = 7)
229229
return substr(hash('md5', uniqid('', true)), 0, $length);
230230
}
231231

232+
/**
233+
* gen UUID
234+
* @param int $version
235+
* @param null $node
236+
* @param null $ns
237+
* @return UUID
238+
*/
239+
public static function genUUID($version = 1, $node = null, $ns = null)
240+
{
241+
return UUID::generate($version, $node, $ns);
242+
}
243+
232244
////////////////////////////////////////////////////////////
233245
/// Convert
234246
////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)