amculin/ektp-generator
最新稳定版本:0.7
Composer 安装命令:
composer require amculin/ektp-generator
包简介
Random Indonesian ID (NIK) generator using PHP
README 文档
README
Generate a valid NIK randomly.
Instalation
composer require amculin/ektp-generator
How to use
use amculin\ektp\generator\KTP; $identity = new KTP(); echo "NIK: {$identity->getNIK()}";
Output:
NIK: 3404086801690002
You can also get the other informations based on the generated NIK
echo "Province: {$identity->getProvince()->id} - {$identity->getProvince()->name}\n"; echo "City: {$identity->getCity()->id} - {$identity->getCity()->name}\n"; echo "District: {$identity->getDistrict()->id} - {$identity->getDistrict()->name}\n"; $birthDate = $identity->getBirthDate()->birthDate; $date = $identity->getBirthDate()->date; $month = $identity->getBirthDate()->month; $year = $identity->getBirthDate()->year; echo "Birth Date: {$birthDate} / {$date}-{$month}-{$year}\n";
Output:
Province: 34 - Daerah Istimewa Yogyakarta City: 04 - Kab. Sleman District: 08 - Berbah Birth Date: 680169 / 28-01-1969
Todo
- OOP Enhancement
- add unit testing
- parameterized generator (by age, province, city, etc.)
- option get dataset from API
统计信息
- 总下载量: 46
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-28