Download the PHP package sharapeco/kana-order without Composer

On this page you can find all versions of the php package sharapeco/kana-order. 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 kana-order

KanaOrder for PHP

KanaOrder は項目を辞書順に並べるためのライブラリです。

入出力文字列は UTF-8 でエンコードされているもののみ扱えます。

使用方法

KanaOrder::get() は「すずめ」「ひよどり」など読みがなとして入力された文字列を引数として鳥、 strcmp など文字コードで文字列を比較する関数を使って比較した際、 辞書順となる文字列を出力する関数です。

example/example1.php を実行してみてください。 次のように辞書順に並んだ結果が出力されると思います。

準拠している「辞書順」

このライブラリは Wikipedia の索引の配列に基づいて実装されています。

  1. 読みの五十音順とする。
  2. 清音・濁音・半濁音は、この順に並べる。
  3. 促音「っ」、拗音「ゃ」「ゅ」「ょ」はそれぞれ「つ」「や」「ゆ」「よ」の後に並べる。
  4. 小文字「ァ」「ィ」「ゥ」「ェ」「ォ」はそれぞれ「あ」「い」「う」「え」「お」の後に並べる。
  5. 長音符「ー」は直前の母音を表すものとし、それぞれ仮名の後に並べる。 例: 「コーヒー」は「こおひい」と見なす。
  6. ひらがなとカタカナは、この順に並べる。

プロジェクト‐ノート:索引/配列順 - Wikipedia

Collator との違い

PHP に同梱されている intl 拡張モジュールに含まれる Collator でも同様のことが実現できますが、 「辞書順」の定義が若干異なっています。

example/example1.php の例では次のように並び順が異なります。

KanaOrder Collator
かつ カツ
カツ かつ
しいく シーク
シーク しいく
ジーク ジーク
しいくいん しいくいん
ひよう ひょう
ひょう ひよう
びょう びょう
ぴょう ぴょう
ひょうい ひょうい
びよういん びょういん
びょういん びよういん
ひようかん ひようかん
ひょうきん ひょうきん
ひよどり ひよどり

All versions of kana-order with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 sharapeco/kana-order contains the following files

Loading the files please wait ....