定制 automex/amex-license-plate-formatter-php 二次开发

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

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

automex/amex-license-plate-formatter-php

最新稳定版本:v1.1.2

Composer 安装命令:

composer require automex/amex-license-plate-formatter-php

包简介

PHP library to validate and format license plate numbers.

README 文档

README

All Contributors

CI Status
Lint Lint
Coverage Coverage
Tests Tests

This library can be used to validate and format license plate numbers.

Countries supported

Europe

  • Belgium (1971-now)
  • Finland (1922-now)
  • France (1976-now)
  • Germany (unknown date-now)
  • Italy (1994-now)
  • Luxembourg (unknown date-now)
  • Netherlands (1951-now)
  • Spain (1900-now)
  • United Kingdom (1903-now)

Africa

  • Central African Republic (2006-now)
  • Gabon (1962-now)

Asia

  • Israel (unknown date-now)

Oceania

  • New Zealand (1964-now)

South America

  • Brazil (1990-now)

More

  • More countries will be added in the future

How to install

composer require automex/amex-license-plate-formatter-php

Or add the following to your composer.json:

{
    "require": {
        "automex/amex-license-plate-formatter-php": "^1.0.0"
    }
}

How to use

Call the constructor of the license plate class of your choice with the user input as the first parameter:

<?php
$licenseplate = new \Amex\LicensePlate\DutchLicensePlate('08ttnp');
if($licenseplate->isValid())
{
    echo $licenseplate->format(); // Outputs 08-TT-NP in this case
}

Since the license plate classes for each country implement the LicensePlateInterface, they expose isValid() and format() methods. Country-specific methods may also be available. Please check the code of the specific class to get the complete picture.

Please note that this library does not check if a license plate actually exists, nor does it exclude combinations that aren't allowed.

License

The code and the documentation are released under the LPGLv2.1 License.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Patrick Groot

🚇 ⚠️ 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1-only
  • 更新时间: 2022-02-08