blendwerk/mnemo
Composer 安装命令:
composer require blendwerk/mnemo
包简介
Turns (large) integers into easier to remember Japanese sounding words and vice versa
README 文档
README
Turns (large) integers into easier to remember Japanese sounding words and vice versa.
This is a port of the Ruby module rufus-mnemo.
Requirements
This library uses PSR-0 compliant namespaces, thus requiring PHP 5.3 or later.
There are no further dependencies.
Installation
This library is available as a Composer package. Add the following to your composer.json file:
{
"require": {
"blendwerk/mnemo": "master"
}
}
Alternatively clone this repo and use a PSR-0 compliant autoloader or manually require Mnemo.php.
Usage
<?php
use Blendwerk\Mnemo\Mnemo;
Mnemo::fromInteger(125704);
# => "karasu"
Mnemo::toInteger('karasu');
# => 125704
Mnemo::fromInteger(-173866);
# => winamote (Negative integers are prefixed with the "wi" syllable.)
Mnemo::isMnemoWord('kazuma');
# => true
Mnemo::isMnemoWord('richard');
# => false
?>
Project Home
This project can be found on https://github.com/aleksblendwerk/Mnemo.
Motivation
I mainly started this project as an exercise in current open source and PHP standards:
- PSR-0, PSR-1 and PSR-2 coding standards
- Packaging using Composer
- Distribution via Packagist
- Testing with PHPUnit
- Continuous integration with Travis
- Inline code documentation according to phpDocumentor
- Version control on GitHub
While none of these are entirely new to me, I felt the urge to go through the whole process once and have a proper project applying best practices out there, hopefully paving the way for many more to come.
Credits
- John Mettraux, the author of the original Ruby module rufus-mnemo
License
Mnemo is licensed under the MIT license.
统计信息
- 总下载量: 285
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-06-15