useallfive / a-vs-an
确定单词前应该使用 'a' 还是 'an'
dev-master
2013-10-18 20:02 UTC
This package is not auto-updated.
Last update: 2024-09-23 16:24:28 UTC
README
PHP 端口版本,基于 http://home.nerbonne.org/A-vs-An/
安装
使用 composer
{ "require": { "useallfive/a-vs-an": "dev-master" } }
Symfony 2
将包添加到您的 AppKernel#registerBundles()
方法中。
$bundles = array( // ... new UseAllFive\AvsAnBundle\UseAllFiveAvsAnBundle(), );
示例用法
Symfony 2
class DefaultController extends Controller { public function defaultAction() { $aVsAn = $this->get('a_vs_an'); $result = $aVsAn->query('0800 number'); } }
print_r($result);
Array ( [aCount] => 8 [anCount] => 25 [prefix] => 08 [article] => an )