bitandblack / sentence-construction
创建漂亮的句子
2.0.0
2022-06-03 12:26 UTC
Requires
- php: >=8.0
Requires (Dev)
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.0
- rector/rector: ^0
- symplify/easy-coding-standard: ^10.0
Suggests
- bitandblack/german-words: A huge list of german words and their grammar rules
README
句子构建
创建漂亮的句子。
安装
这个库是为与 Composer 一起使用而制作的。通过运行 $ composer require bitandblack/sentence-construction
将其添加到您的项目中。
使用方法
创建一个这样的句子
<?php
use BitAndBlack\SentenceConstruction;
$fruits = [
'Apples',
'Bananas',
'Pears'
];
$sentence = new SentenceConstruction(
glue: ', ',
glueLast: ' and ',
pieces: $fruits,
);
var_dump('I like ' . $sentence);
这将输出 我喜欢苹果、香蕉和梨
。
帮助
如果您有任何问题,请随时通过 hello@bitandblack.com
联系我们。
有关 Bit&Black 的更多信息可以在 www.bitandblack.com 找到。