asisteam/mvcr-document-validator
Composer 安装命令:
composer require asisteam/mvcr-document-validator
包简介
Implemenation of communication with MVCR document validator API
README 文档
README
Credits
The development is under AsisTeam s.r.o.. Feel free to use and contribute.
Install
composer require asisteam/mvcr-document-validator
Versions
| State | Version | Branch | PHP |
|---|---|---|---|
| development | ^0.1 |
master |
>= 7.1 |
| production | ^1.0 |
master |
>= 7.1 |
Overview
This package communicates with MVČR API and check if given document is found amomg registered invalid documents.
Create Validator client instance and call it's validate method passing the given Document entity.
Following document types can be validated:
- Czech personal id cards
- Czech passports (issued centrally or regionally)
- Czech gun licenses
Original MVČR documentation to be found at: https://www.mvcr.cz/clanek/neplatne-doklady-ve-formatu-xml.aspx
Usage
Juc create Document object and Validator instance and pass the Document to Validator's method validate, which returns ValidatorResult object.
Using ValidatorResult you can verify whether the given document is marked as invalid in MVČR registries or not.
Furthermore you may get the information when the document was added to the registries and when the registries themselves were last updated.
Please use DocumentType enum for specifying the document type.
$document = new Document('123456AB', DocumentType::PERSONAL_ID_CARD); $response = (new Validator())->validate($document); // true if given document was found in registry of invalid documents $response->isInvalid();
Or you can configure it as Nette Framework DI service
extensions: mvcr.doc_validator: AsisTeam\MVCR\DocumentValidator\Bridges\Nette\DI\ValidatorExtension mvcr.doc_validator: timeout: 5
If any problem during doing the Request to API or parsing the response the ResponseException in being thrown.
asisteam/mvcr-document-validator 适用场景与选型建议
asisteam/mvcr-document-validator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.33k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 12 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「passport」 「mvcr」 「personal id card」 「gun license」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 asisteam/mvcr-document-validator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 asisteam/mvcr-document-validator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 asisteam/mvcr-document-validator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
A package to allow laravel/passport use with mongodb/laravel-mongodb
Multiauth and custom grants for laravel passport
Simple laravel passport multiple user authentication
This is a Laravel passport grant for the SMS.
A Laravel Package for easy API authentication setup with passport
统计信息
- 总下载量: 1.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-21