jeroen-g/textconveyor
Composer 安装命令:
composer require jeroen-g/textconveyor
包简介
Send any text over a conveyor to format it.
关键字:
README 文档
README
The TextConveyor takes your text, whatever size, and runs it through a list of formatters that is defined by you.
Installation
Via Composer
$ composer require jeroen-g/textconveyor
In case you're using Laravel, a service provider and facade get registered automatically. With artisan vendor:publish you can alter the formatters that get set in the config file.
Usage
$assembler = new JeroenG\TextConveyor\Assembler; $assembler->setFormatters([App\RemoveBadWords::class, App\LowercaseNames::class]); $assembler->addFormatter(App\CapitalizeNames::class); $assembler->removeFormatter(App\LowercaseNames::class); $formattedText = $assembler->sendContentThroughFormatters($content);
This is how it could be used in an Eloquent model:
public function getBodyAttribute($body) { return app(JeroenG\TextConveyor\Assembler::class)->sendContentThroughFormatters($body); }
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
License
license. Please see the license file for more information.
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: EUPL-1.1
- 更新时间: 2018-03-23