haruncpi/fluent-pipe
最新稳定版本:v1.0.1
Composer 安装命令:
composer require haruncpi/fluent-pipe
包简介
Enables fluent value transformation via chained callbacks
README 文档
README
Enables fluent value transformation via chained callbacks
Installation
composer require haruncpi/fluent-pipe
Usage
use Haruncpi\FluentPipe\FluentPipe; $text = FluentPipe::from(' hello fluent pipe!') ->then(fn($text) => trim($text)) ->then(fn($text) => explode(' ', $text)) ->then(fn($text) => array_map(fn($word) => ucfirst($word), $text)) ->then(fn($array) => implode(' ', $array)) ->get(); echo $text; // Hello Fluent Pipe!
Or
use Haruncpi\FluentPipe\FluentPipe; $text = FluentPipe::from(' hello fluent pipe!') ->through([ fn($text) => trim($text), fn($text) => explode(' ', $text), fn($text) => array_map(fn($word) => ucfirst($word), $text), fn($array) => implode(' ', $array), ]) ->get(); var_dump($text); // Hello Fluent Pipe!
License
CC BY 4.0
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: cc-by-4.0
- 更新时间: 2025-07-16