承接 dakujem/cumulus 相关项目开发

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

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

dakujem/cumulus

最新稳定版本:2.0.3

Composer 安装命令:

composer require dakujem/cumulus

包简介

☁ A set of utilities for easier development of cloud-enabled software.

README 文档

README

PHP from Packagist PHP Test Coverage Status

A set of plug-in utilities for easier development of cloud-enabled software.

💿 composer require dakujem/cumulus

📒 Changelog

Documentation

Included classes:

As of now, the library has no external dependencies.

Compatibility

dakujem/cumulus PHP
^2.0 ^8 onwards
^1.5, ^1.6 7.2, 7.3, 7.4, 8.0
^1.4 7.2, 7.3, 7.4

Examples

Pipelines & middleware

$foobarSuffixTube = Pipeline::tube([
    function (string $a): string {
        return $a . 'foo';
    },
    function (string $a): string {
        return $a . 'bar';
    },
]);
$foobarSuffixTube('iam'); // 'iamfoobar'

$foobarPrefixMiddleware = Pipeline::onion([
    function (string $a, callable $next): string {
        return $next('bar' . $a);
    },
    function (string $a, callable $next): string {
        return $next('foo' . $a);
    },
]);
$foobarPrefixMiddleware('youare'); // 'foobaryouare'

More in the documentation here: Middleware and Pipelines.

Dsn

$dsn = new Dsn('mysqli://john:secret@localhost/my_db');

// with optional default values
$driver = $dsn->get('driver', 'mysqli');
$port = $dsn->get('port', 3306);
// without optional defaults
$user = $dsn->get('username');
// using magic and array accessors:
$user = $dsn->username;
$user = $dsn['username'];
$pass = $dsn->password ?? '';

More in the documentation here: Dsn (Data Source Name).

Testing

Run unit tests using the following command:

$ composer test

Contributing

Ideas or contribution is welcome. Please send a PR or file an issue.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2017-06-05