定制 goatherd/goatherd-library-uuid 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

goatherd/goatherd-library-uuid

Composer 安装命令:

composer require goatherd/goatherd-library-uuid

包简介

UUID generator for PHP 5.3 or newer

README 文档

README

Dual-licensed under BSDL (2-clause) or Apache 2.0 license

Derived from code by Fredrik Lindberg.

Features

Optimised for use with PHP 5.3+ and psr-2 compliant.

  • Composer support (packagist)
  • format as FMT_STRING, FMT_BYTE or FMT_BINARY
  • psr-0 autoloading
  • UUID version 1 (time), 3 (md5), 4 (random) and 5 (sha1)
  • generates same UUIDs for little and big endian architecture
  • UnitTested

Usage

use \Goatherd\Uuid\Factory as Uuid;

// default: version 5 string formated uuid
$uuid = Uuid::generate();

// version 4 byte formated uuid
$uuid = Uuid::generate(Uuid::UUID_RANDOM, Uuid::FMT_BYTE);

// get version 4 uuid from generator instance
$uuidGenerator = new \Goatherd\Uuid\V4();
$uuid = $uuidGenerator(Uuid::FMT_STRING);

统计信息

  • 总下载量: 3.34k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 2012-11-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固