dhii/versions
最新稳定版本:v0.1.0-alpha3
Composer 安装命令:
composer require dhii/versions
包简介
Implementation for dealing with SemVer-compliant versions
README 文档
README
Implementation for dealing with SemVer-compliant versions.
Details
The idea is to provide a minimal implementation that would deal with standards-compliant version numbers, while being standards compliant itself.
Usage
<?php use Dhii\Versions\StringVersionFactory; $factory = new StringVersionFactory(); $version = $factory->createVersionFromString('0.1.15-alpha1.2.3+hello.world.987'); echo $version->getMajor(); // 0 echo $version->getMinor(); // 1 echo $version->getPatch(); // 15 var_export($version->getPreRelease()); // ['alpha1', 2, 3] var_export($version->getBuild()); // ['hello', 'world', '987']
统计信息
- 总下载量: 120.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 未知