承接 stratadox/command-handling 相关项目开发

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

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

stratadox/command-handling

Composer 安装命令:

composer require stratadox/command-handling

包简介

README 文档

README

A simple command handling mechanism.

Build Status Coverage Status Scrutinizer Code Quality

Installation

Install using composer require stratadox/command-handling

Example

<?php
use Stratadox\CommandHandling\CommandBus;

$bus = CommandBus::handling([
    SomeCommand::class => new SomeHandler(),
    OtherCommand::class => new OtherHandler(),
]);
$bus->handle(new SomeCommand('foo'));

Glossary

Command

Commands are simple messages (DTO) that represent a request for an operation. These commands are not the same kind as described in the GOF design patterns, but rather command messages from the CQRS realm.

Handler

A command handler receives the commands, either accepting them and initiating the operation, or denying them and throwing an exception.

Bus

The command bus routes the input command to the appropriate handler.

Middleware

Middleware can be configured to perform operations before or after handling commands, or on exception cases.

Such middleware can be used to introduce automated logging of all requests, to automatically reject unauthorised access or to handle persistence concerns. Using the middleware functionality in this way grants the benefits of what people call aspect-oriented programming, without most of the downsides that come with.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固