signpostmarv/steam-id
Composer 安装命令:
composer require signpostmarv/steam-id
包简介
SteamID Parsing
README 文档
README
A library for parsing Steam IDs
Requirements
- php-7.4
- ext-ctype
Install
composer require signpostmarv/steam-id
Suggested Steps
Use vimeo/psalm
Psalm saves on implementing runtime checks that can be detected with static analysis.
For example, at the time of writing an ID's Universe component does not go higher than 5 but uses an 8-bit field, but the following code will fail to pass a check on psalm:
new \SignpostMarv\SteamId\SteamId(0, 0, 0, 0, 6);
ERROR: InvalidArgument - Argument 5 of SignpostMarv\SteamId\SteamId::__construct expects int(0)|int(1)|int(2)|int(3)|int(4)|int(5), int(6) provided
Optional Steps
Use either the BCMath or GMP calculators if the relevant php extension is available.
Examples
Obtain Steam Community URL
use SignpostMarv\SteamId\Parser; $parser = new Parser(); $id = $parser->FromString('76561197960287930'); $url = $parser->ToSteamCommunityUrl($id);
License
Apache-2.0
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-01-03