承接 morfu/pipe 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

morfu/pipe

最新稳定版本:0.1.1

Composer 安装命令:

composer require morfu/pipe

包简介

Invokable pipeline of functions.

README 文档

README

Latest Version on Packagist Software License

NOT for production. API is NOT stable.

Why?

Instead of doing

$string = 'SCREAMING_SNAKE_CASE';
$string = strtolower($string);
$words = explode('_', $string);
$words = array_map('ucfirst', $words);
$camelized = implode('', $words);
// => 'ScreamingSnakeCase'

do

flow('SCREAMING_SNAKE_CASE', pipe()
    ->_('strtolower')
    ->left('explode', '_')
    ->left('array_map', 'ucfirst')
    ->left('implode', ''));
// => 'ScreamingSnakeCase'

For further examples see tests/.

What is Morfu

Morfu (from Ancient Greek: μετᾰμορφόω, metamorphóō, "transform") is a set of pipeline-oriented PHP libraries.

What is Pipe

Pipe is a core library of Morfu that provides pipepline itself and some functions that act on other functions.

Install

Via Composer

$ composer require morfu/pipe

Usage

Import functions

PHP Documentation

use function Morfu\Pipe\functions\through;

$term = through(" tErm\t", 'trim', 'strtolower', 'ucfirst');

If your PHP version is less than 5.6 you should import parent namespace and use functions with the namespace prefix:

use Morfu\Pipe\functions as f;

$term = f\through(" tErm\t", 'trim', 'strtolower', 'ucfirst');

Testing

$ make test

Security

If you discover any security related issues, please email kilych@zoho.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固