定制 ybelenko/ogrn 二次开发

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

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

ybelenko/ogrn

Composer 安装命令:

composer require ybelenko/ogrn

包简介

Tiny library for validating OGRN and OGRNIP business identifiers in Russia.

README 文档

README

Latest Stable Version Build Status Coverage Status License

Tiny PHP library for validating OGRN(ОГРН) and OGRNIP(ОГРНИП) business identifiers in Russia. It just verifies number length and last control digit, so if identifier passes validation it doesn't mean that it exists in a real world. If you need to check that OGRN or OGRNIP exists visit http://egrul.nalog.ru.

Installation

It's recommended that you use Composer to install.

$ composer require ybelenko/ogrn

Usage

require_once __DIR__ . '/vendor/autoload.php';

use Ybelenko\Ogrn\Ogrn;
use Ybelenko\Ogrn\Ogrnip;

// when you need to validate OGRN number
$isValid = Ogrn::validate("1127746509780");// returns true if identifier is valid

// when you need to validate OGRNIP number
$isValid = Ogrnip::validate("304500116000157");// returns true if identifier is valid

While 32 bit systems have a maximum signed integer range of -2147483648 to 2147483647 you always should store OGRN and OGRNIP identifiers as string.

$ogrn = 1127746509780; // is bad 
echo $ogrn; // 2147483647

$ogrn = '1127746509780'; // is good
echo $ogrn; // 1127746509780

Tests

To execute the test suite, you'll need to clone current repo and install it with dev dependencies:

$ git clone https://github.com/ybelenko/ogrn
$ cd ogrn
$ composer install
$ composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固