haruncpi/fluent-pipe 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: cc-by-4.0
  • 更新时间: 2025-07-16