定制 poirot/core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

poirot/core

最新稳定版本:0.2

Composer 安装命令:

composer require poirot/core

包简介

Poirot Standard Libraries and Base Functionality.

README 文档

README

Build Status

Poirot\Std is a set of components that implements general purpose utility class for different scopes like:

  • array utilities functions;
  • TODO

Invokable Responder

class SayHi
{
    function __construct($name, $family)
    {
        $this->name = $name;
        $this->family = $family;
    }

    function __toString()
    {
        return sprintf('Hello %s %s.', $this->name, $this->family);
    }
}

$inv1 = function () {
    return ['name' => 'Payam'];
};

$inv2 = function ($name, $family) {
    return new SayHi($name, $family);
};


$invokable = new InvokableResponder(function() {
    return ['family' => 'Naderi'];
});

$invokable = $invokable
    ->thenWith($inv1)

    ->thenWith($inv2)

    ->thenWith(function (SayHi $message) {
        return (string) $message;
    })->setIdentifier('hello')
;

$r = $invokable(['family' => 'Payami'])['hello'];
// Hello Payam Payami

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-12-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固