Download the PHP package jp3cki/mynumber without Composer

On this page you can find all versions of the php package jp3cki/mynumber. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mynumber

MyNumber-PHP

MyNumber-PHP はマイナンバーの検証やダミーデータの生成を行う PHP ライブラリです。MIT ライセンスで提供しています。

使い方

環境

準備

  1. まだ設定していなければ Composer を使えるようにします。具体的な方法は Download Composer を確認してください。

  2. 現在のあなたのソースコードで Composer を使用していなければ、次のコマンドを実行してください。

    あなたのソースコード(プロジェクト)についていくつか質問されますので適当に答えてください。完了すると composer.json ファイルが生成されます。

  3. jp3cki/mynumber を Composer 経由でインストールします。

    • 開発時にのみ使用し、本番では使用しない場合(例えばテストデータの生成のみに使用する場合)

    • 本番でも使用する場合
  4. これで利用の準備が整いました。

詳しくは Composer のウェブサイトか、Composer の解説サイトを参照してください。

なお、 Composer 経由でインストールしたライブラリ等を使用する際は、あなたのプログラムの最初の方で vendor/autoload.phprequire または include してください。

利用

入力値の検証

マイナンバーの最後(最も右)の桁はチェックディジットになっています。

jp3cki\mynumber\MyNumber::isValid() は 12 桁の数字からなる文字列を受け取り、チェックディジットが正しいことを確認します。

ダミーデータの作成

jp3cki\mynumber\MyNumber::generate() はチェックディジットが正しい(理論上存在しうる)番号をランダムに生成します。

マイナンバー自体が 1011 = 1000 億通りしか存在しないため、完全にランダムに生成した場合でもマイナンバー運用開始時点でそれなりに実在する番号になっていることに注意してください。

LICENSE

CHANGE LOG

備考


All versions of mynumber with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.3.3
ext-pcre Version *
paragonie/random_compat Version @stable
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jp3cki/mynumber contains the following files

Loading the files please wait ....