davidyell/numbers_to_words
最新稳定版本:0.0.5
Composer 安装命令:
composer require davidyell/numbers_to_words
包简介
A helper for converting numbers into words
README 文档
README
A helper for CakePHP3 to convert numbers into words.
Have you ever wanted to use a number as a css class? Or title items in a loop, but number just look messy? I have, and so I made this quick plugin to solve that problem.
Installation
You can find the plugin listed on Packagist.
https://packagist.org/packages/davidyell/numbers_to_words
You can use this to require it into your CakePHP 3 project by adding it to your composer.json file.
Configuration
You need to load the plugin in your config/bootstrap.php
Plugin::load('NumbersToWords');
You'll need to add it to your controllers helpers array and configure your locale.
public $helpers = [ 'NumbersToWords.NumbersToWords' => [ 'locale' => 'en_GB' ] ];
Usage
<?= $this->NumbersToWords->spell(5); // 'five';?>
Contribution
If you would like to add more conversions, please fork and submit a pull request.
License
See LICENSE
统计信息
- 总下载量: 2.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-30