承接 backfron/cedula-ecuador 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

backfron/cedula-ecuador

最新稳定版本:0.2

Composer 安装命令:

composer require backfron/cedula-ecuador

包简介

Package to validate and obtain information on ecuadorian CI.

README 文档

README

Validator for ecuadorian CI.

Instalation

composer require backfron/cedula-ecuador

Usage

You may initialize a new Cedula object providing the CI number as a string. Is important that you provide a string because some CI numbers start with a 0.

use  \Backfron\CedulaEcuador\Cedula;

$cedula = new Cedula('1234567890');

/**
 * The isValid() method will return true if the CI
 * number is valid or false otherwise.
 */

if($cedula->isValid()) {
    echo "The number is valid";
} else {
    echo "The number is invalid";
}

Obtaining info

You can also get the province where the CI was issued.

use  \Backfron\CedulaEcuador\Cedula;

$cedula = new Cedula('1003495585');
$cedula->getProvince(); // Imbabura

Tests

You can run the test running vendor/bin/phpunit.

Contributions

If you have a contribution or a bug fix, please open a PR including a tests for your code.

Credits

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-22