pauci/cqrs-factory 问题修复 & 功能扩展

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

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

pauci/cqrs-factory

Composer 安装命令:

composer require pauci/cqrs-factory

包简介

CQRS factories for PSR-11

README 文档

README

Source Code Latest Version Build Status Coverage Status Software License Total Downloads

CQRS factories for PSR-11

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy CQRS integration in a project.

Installation

The easiest way to install this package is through composer:

$ composer require pauci/cqrs-factory

Configuration

In the general case where you are only using a single command bus, it's enough to define the command bus factory:

return [
    'dependencies' => [
        'factories' => [
            'cqrs.command_bus.cqrs_default' => \CQRSFactory\CommandBusFactory::class,
        ],
    ],
];

If you want to add a second command bus, or use another name than "cqrs_default", you can do so by using the static variants of the factories:

return [
    'dependencies' => [
        'factories' => [
            'cqrs.command_bus.cqrs_other' => [\CQRSFactory\CommandBusFactory::class, 'cqrs_other'],
        ],
    ],
];

Each factory supplied by this package will by default look for a registered factory in the container. If it cannot find one, it will automatically pull its dependencies from on-the-fly created factories. This saves you the hassle of registering factories in your container which you may not need at all. Of course, you can always register those factories when required. The following additional factories are available:

  • \CQRSFactory\EventBusFactory (cqrs.event_bus.*)
  • \CQRSFactory\EventPublisherFactory (cqrs.event_publisher.*)
  • \CQRSFactory\EventStoreFactory (cqrs.event_store.*)
  • \CQRSFactory\IdentityMapFactory (cqrs.identity_map.*)
  • \CQRSFactory\SerializerFactory (cqrs.serializer.*)
  • \CQRSFactory\TransactionManagerFactory (cqrs.transaction_manager.*)

Each of those factories supports the same static behavior as the command bus factory. For container specific configurations, there are a few examples provided in the example directory:

Example configuration

A complete example configuration can be found in example/config.php.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固